Skip to content

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

feat: icon copy

dev_wandryb3bad4048a0d
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index a1460300..736bd8e3 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -11,6 +11,7 @@ import { AlertTriangleIconStatic } from "@/registry/remocn/icon-alert-triangle";
import { BellIconStatic } from "@/registry/remocn/icon-bell";
import { CheckCircleIconStatic } from "@/registry/remocn/icon-check-circle";
import { CheckIconStatic } from "@/registry/remocn/icon-check";
+import { CopyIconStatic } from "@/registry/remocn/icon-copy";
import { DownloadIconStatic } from "@/registry/remocn/icon-download";
import { InfoIconStatic } from "@/registry/remocn/icon-info";
import { LoaderIconStatic } from "@/registry/remocn/icon-loader";
@@ -103,6 +104,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: UploadIconStatic,
},
+ {
+ name: "icon-copy",
+ label: "Copy",
+ category: "Actions & UI",
+ Static: CopyIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 01918ac1..2dfe0104 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -28,6 +28,7 @@ import { iconAlertTriangleConfig } from "@/registry/remocn/icon-alert-triangle/c
import { iconBellConfig } from "@/registry/remocn/icon-bell/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";
import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";
import { iconInfoConfig } from "@/registry/remocn/icon-info/config";
import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";
@@ -589,6 +590,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconCheckConfig,
},
+ "icon-copy": {
+ load: () =>
+ import("@/registry/remocn/icon-copy").then((m) => ({
+ default: m.CopyIcon,
+ })),
+ config: iconCopyConfig,
+ },
"icon-download": {
load: () =>
import("@/registry/remocn/icon-download").then((m) => ({
diff --git a/registry/remocn/icon-copy/config.ts b/registry/remocn/icon-copy/config.ts
new file mode 100644
index 00000000..72915046
--- /dev/null
+++ b/registry/remocn/icon-copy/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconCopyConfig: ComponentConfig = {
+ componentName: "CopyIcon",
+ importPath: "@/components/remocn/icon-copy",
+ 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-copy/index.tsx b/registry/remocn/icon-copy/index.tsx
new file mode 100644
index 00000000..9cf42b1a
--- /dev/null
+++ b/registry/remocn/icon-copy/index.tsx
@@ -0,0 +1,124 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const BACK_PATH = "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2";
+const FRONT_PATH =
+ "M10 8H20A2 2 0 0 1 22 10V20A2 2 0 0 1 20 22H10A2 2 0 0 1 8 20V10A2 2 0 0 1 10 8Z";
+
+const TIMINGS = {
+ drawDurationInFrames: 14,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 20,
+ loop: false,
+} as const;
+
+export function CopyIcon({
+ animation = "both",
+ loop,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionProgress } = useIconAnimation(
+ { animation, loop, speed },
+ TIMINGS,
+ );
+
+ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);
+
+ const backProgress = interpolate(linearDraw, [0, 0.714], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const frontProgress = interpolate(linearDraw, [0.286, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const back = drawnPathProps(BACK_PATH, backProgress);
+ const front = drawnPathProps(FRONT_PATH, frontProgress);
+
+ const offset = interpolate(
+ actionProgress,
+ [0, 0.35, 0.65, 1],
+ [0, -2, -2, 0],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ },
+ );
+
+ const scale = 0.85 + 0.15 * scaleIn;
+
+ 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={BACK_PATH}
+ strokeDasharray={back.strokeDasharray}
+ strokeDashoffset={back.strokeDashoffset}
+ />
+ <g transform={`translate(${offset} ${offset})`}>
+ <path
+ d={FRONT_PATH}
+ strokeDasharray={front.strokeDasharray}
+ strokeDashoffset={front.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function CopyIconStatic({
+ 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"
+ >
+ <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
+ <path d={BACK_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 36c40448..452386b8 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1503,6 +1503,21 @@
"target": "components/remocn/icon-upload.tsx"
}
]
+ },
+ {
+ "name": "icon-copy",
+ "type": "registry:component",
+ "title": "Copy",
+ "description": "Animated Lucide copy icon — the two sheets draw back-to-front, then the front sheet lifts and settles to read as a duplicate for a copy-to-clipboard beat.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-copy/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-copy.tsx"
+ }
+ ]
}
]
}