Skip to content

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

feat: icon download

dev_wandry2f15120d36f5
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 36c98cd7..39687e25 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 { DownloadIconStatic } from "@/registry/remocn/icon-download";
import { InfoIconStatic } from "@/registry/remocn/icon-info";
import { LoaderIconStatic } from "@/registry/remocn/icon-loader";
import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";
@@ -89,6 +90,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: BellIconStatic,
},
+ {
+ name: "icon-download",
+ label: "Download",
+ category: "Actions & UI",
+ Static: DownloadIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 56dbd553..004f0a2b 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 { iconDownloadConfig } from "@/registry/remocn/icon-download/config";
import { iconInfoConfig } from "@/registry/remocn/icon-info/config";
import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";
import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/config";
@@ -587,6 +588,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconCheckConfig,
},
+ "icon-download": {
+ load: () =>
+ import("@/registry/remocn/icon-download").then((m) => ({
+ default: m.DownloadIcon,
+ })),
+ config: iconDownloadConfig,
+ },
"icon-info": {
load: () =>
import("@/registry/remocn/icon-info").then((m) => ({
diff --git a/registry/remocn/icon-download/config.ts b/registry/remocn/icon-download/config.ts
new file mode 100644
index 00000000..6dd11234
--- /dev/null
+++ b/registry/remocn/icon-download/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconDownloadConfig: ComponentConfig = {
+ componentName: "DownloadIcon",
+ importPath: "@/components/remocn/icon-download",
+ 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-download/index.tsx b/registry/remocn/icon-download/index.tsx
new file mode 100644
index 00000000..77cda14e
--- /dev/null
+++ b/registry/remocn/icon-download/index.tsx
@@ -0,0 +1,140 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const TRAY_DRAW = "M3 15v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4";
+const TRAY_STATIC = "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4";
+const SHAFT_DRAW = "M12 3V15";
+const SHAFT_STATIC = "M12 15V3";
+const HEAD_PATH = "M7 10 12 15 17 10";
+
+const TIMINGS = {
+ drawDurationInFrames: 14,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 18,
+ loop: false,
+} as const;
+
+export function DownloadIcon({
+ 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 trayProgress = interpolate(linearDraw, [0, 0.714], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const arrowProgress = interpolate(linearDraw, [0.429, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const arrowOpacity = interpolate(linearDraw, [0.429, 0.6], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ });
+
+ const tray = drawnPathProps(TRAY_DRAW, trayProgress);
+ const shaft = drawnPathProps(SHAFT_DRAW, arrowProgress);
+ const head = drawnPathProps(HEAD_PATH, arrowProgress);
+
+ const dropY = interpolate(actionProgress, [0, 0.25, 0.65, 1], [0, -4, 3, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const traySquash = interpolate(
+ actionProgress,
+ [0, 0.5, 0.65, 0.8, 1],
+ [1, 1, 0.94, 1, 1],
+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },
+ );
+
+ 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})`,
+ }}
+ >
+ <g transform={`translate(12 21) scale(1 ${traySquash}) translate(-12 -21)`}>
+ <path
+ d={TRAY_DRAW}
+ strokeDasharray={tray.strokeDasharray}
+ strokeDashoffset={tray.strokeDashoffset}
+ />
+ </g>
+ <g opacity={arrowOpacity} transform={`translate(0 ${dropY})`}>
+ <path
+ d={SHAFT_DRAW}
+ strokeDasharray={shaft.strokeDasharray}
+ strokeDashoffset={shaft.strokeDashoffset}
+ />
+ <path
+ d={HEAD_PATH}
+ strokeDasharray={head.strokeDasharray}
+ strokeDashoffset={head.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function DownloadIconStatic({
+ 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={SHAFT_STATIC} />
+ <path d={TRAY_STATIC} />
+ <path d={HEAD_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 0145513d..ebd4d829 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1473,6 +1473,21 @@
"target": "components/remocn/icon-bell.tsx"
}
]
+ },
+ {
+ "name": "icon-download",
+ "type": "registry:component",
+ "title": "Download",
+ "description": "Animated Lucide download icon — the tray draws on, the arrow fades in, then drops into the tray with a squash on impact for a download or export beat.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-download/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-download.tsx"
+ }
+ ]
}
]
}