Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: icon camera~

dev_wandrye8e76506831d
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 7b38bd5f..abc3b107 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -14,6 +14,7 @@ import { ArrowLeftIconStatic } from "@/registry/remocn/icon-arrow-left";
import { ArrowRightIconStatic } from "@/registry/remocn/icon-arrow-right";
import { ArrowUpIconStatic } from "@/registry/remocn/icon-arrow-up";
import { BellIconStatic } from "@/registry/remocn/icon-bell";
+import { CameraIconStatic } from "@/registry/remocn/icon-camera";
import { CheckCircleIconStatic } from "@/registry/remocn/icon-check-circle";
import { CheckIconStatic } from "@/registry/remocn/icon-check";
import { CopyIconStatic } from "@/registry/remocn/icon-copy";
@@ -207,6 +208,12 @@ export const ICONS: IconEntry[] = [
category: "Media & playback",
Static: VideoIconStatic,
},
+ {
+ name: "icon-camera",
+ label: "Camera",
+ category: "Media & playback",
+ Static: CameraIconStatic,
+ },
{
name: "icon-heart",
label: "Heart",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 1784025a..bb07e5bd 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -30,6 +30,7 @@ import { iconArrowLeftConfig } from "@/registry/remocn/icon-arrow-left/config";
import { iconArrowRightConfig } from "@/registry/remocn/icon-arrow-right/config";
import { iconArrowUpConfig } from "@/registry/remocn/icon-arrow-up/config";
import { iconBellConfig } from "@/registry/remocn/icon-bell/config";
+import { iconCameraConfig } from "@/registry/remocn/icon-camera/config";
import { iconCheckCircleConfig } from "@/registry/remocn/icon-check-circle/config";
import { iconCheckConfig } from "@/registry/remocn/icon-check/config";
import { iconCopyConfig } from "@/registry/remocn/icon-copy/config";
@@ -634,6 +635,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconBellConfig,
},
+ "icon-camera": {
+ load: () =>
+ import("@/registry/remocn/icon-camera").then((m) => ({
+ default: m.CameraIcon,
+ })),
+ config: iconCameraConfig,
+ },
"icon-check": {
load: () =>
import("@/registry/remocn/icon-check").then((m) => ({
diff --git a/registry/remocn/icon-camera/config.ts b/registry/remocn/icon-camera/config.ts
new file mode 100644
index 00000000..38272a2b
--- /dev/null
+++ b/registry/remocn/icon-camera/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconCameraConfig: ComponentConfig = {
+ componentName: "CameraIcon",
+ importPath: "@/components/remocn/icon-camera",
+ controls: {
+ animation: {
+ type: "select",
+ default: "both",
+ options: ["draw", "action", "both"],
+ label: "Animation",
+ },
+ loop: {
+ type: "boolean",
+ default: false,
+ label: "Loop",
+ },
+ size: {
+ type: "number",
+ default: 48,
+ min: 24,
+ max: 200,
+ step: 4,
+ label: "Size",
+ },
+ color: {
+ type: "color",
+ default: "#171717",
+ label: "Color",
+ },
+ strokeWidth: {
+ type: "number",
+ default: 2,
+ min: 1,
+ max: 3,
+ step: 0.25,
+ label: "Stroke width",
+ },
+ },
+ durationInFrames: 70,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-camera/index.tsx b/registry/remocn/icon-camera/index.tsx
new file mode 100644
index 00000000..5fd1858d
--- /dev/null
+++ b/registry/remocn/icon-camera/index.tsx
@@ -0,0 +1,128 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const BODY_PATH =
+ "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z";
+const LENS_PATH =
+ "M12 10 A3 3 0 0 1 15 13 A3 3 0 0 1 12 16 A3 3 0 0 1 9 13 A3 3 0 0 1 12 10";
+
+const TIMINGS = {
+ drawDurationInFrames: 18,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 18,
+ loop: false,
+} as const;
+
+export function CameraIcon({
+ animation = "both",
+ loop,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionProgress, actionFrame } =
+ useIconAnimation({ animation, loop, speed }, TIMINGS);
+
+ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);
+
+ const bodyDraw = interpolate(linearDraw, [0, 0.667], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const lensDraw = interpolate(linearDraw, [0.444, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const acting = animation !== "draw" && actionFrame >= 0;
+
+ const shutter = acting
+ ? interpolate(
+ actionProgress,
+ [0, 0.28, 0.56, 0.78, 1],
+ [1, 0.55, 1.08, 1, 1],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ },
+ )
+ : 1;
+
+ const body = drawnPathProps(BODY_PATH, bodyDraw);
+ const lens = drawnPathProps(LENS_PATH, lensDraw);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const lensTransform = `translate(${12 * (1 - shutter)} ${13 * (1 - shutter)}) scale(${shutter})`;
+
+ return (
+ <svg
+ className={className}
+ width={size}
+ height={size}
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke={color}
+ strokeWidth={strokeWidth}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ style={{
+ overflow: "visible",
+ transformOrigin: "center",
+ transform: `scale(${scale})`,
+ }}
+ >
+ <path
+ d={BODY_PATH}
+ strokeDasharray={body.strokeDasharray}
+ strokeDashoffset={body.strokeDashoffset}
+ />
+ <g transform={lensTransform}>
+ <path
+ d={LENS_PATH}
+ strokeDasharray={lens.strokeDasharray}
+ strokeDashoffset={lens.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function CameraIconStatic({
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: {
+ size?: number;
+ color?: string;
+ strokeWidth?: number;
+ className?: string;
+}) {
+ return (
+ <svg
+ className={className}
+ width={size}
+ height={size}
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke={color}
+ strokeWidth={strokeWidth}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d={BODY_PATH} />
+ <circle cx="12" cy="13" r="3" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 10615141..e2072699 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1819,6 +1819,21 @@
}
]
},
+ {
+ "name": "icon-camera",
+ "type": "registry:component",
+ "title": "Camera",
+ "description": "Animated Lucide camera icon — draws on, then the lens blinks shut and open like a shutter firing.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-camera/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-camera.tsx"
+ }
+ ]
+ },
{
"name": "icon-sparkles",
"type": "registry:component",