Skip to content

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

feat: icon upload

dev_wandry41b2517254ab
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 39687e25..a1460300 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -16,6 +16,7 @@ import { InfoIconStatic } from "@/registry/remocn/icon-info";
import { LoaderIconStatic } from "@/registry/remocn/icon-loader";
import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";
import { SearchIconStatic } from "@/registry/remocn/icon-search";
+import { UploadIconStatic } from "@/registry/remocn/icon-upload";
import { XIconStatic } from "@/registry/remocn/icon-x";
export type IconCategory =
@@ -96,6 +97,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: DownloadIconStatic,
},
+ {
+ name: "icon-upload",
+ label: "Upload",
+ category: "Actions & UI",
+ Static: UploadIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 004f0a2b..01918ac1 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -33,6 +33,7 @@ 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";
import { iconSearchConfig } from "@/registry/remocn/icon-search/config";
+import { iconUploadConfig } from "@/registry/remocn/icon-upload/config";
import { iconXConfig } from "@/registry/remocn/icon-x/config";
import { infiniteBentoPanConfig } from "@/registry/remocn/infinite-bento-pan/config";
import { infiniteMarqueeConfig } from "@/registry/remocn/infinite-marquee/config";
@@ -623,6 +624,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconSearchConfig,
},
+ "icon-upload": {
+ load: () =>
+ import("@/registry/remocn/icon-upload").then((m) => ({
+ default: m.UploadIcon,
+ })),
+ config: iconUploadConfig,
+ },
"icon-check-circle": {
load: () =>
import("@/registry/remocn/icon-check-circle").then((m) => ({
diff --git a/registry/remocn/icon-upload/config.ts b/registry/remocn/icon-upload/config.ts
new file mode 100644
index 00000000..7bce51e1
--- /dev/null
+++ b/registry/remocn/icon-upload/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconUploadConfig: ComponentConfig = {
+ componentName: "UploadIcon",
+ importPath: "@/components/remocn/icon-upload",
+ 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-upload/index.tsx b/registry/remocn/icon-upload/index.tsx
new file mode 100644
index 00000000..f2b9fa3e
--- /dev/null
+++ b/registry/remocn/icon-upload/index.tsx
@@ -0,0 +1,145 @@
+"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 15V3";
+const SHAFT_STATIC = "M12 3v12";
+const HEAD_PATH = "M17 8 12 3 7 8";
+
+const TIMINGS = {
+ drawDurationInFrames: 14,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 18,
+ loop: false,
+} as const;
+
+export function UploadIcon({
+ 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 launchY = interpolate(
+ actionProgress,
+ [0, 0.4, 0.7, 1],
+ [0, -5, 1, 0],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ },
+ );
+ const traySquash = interpolate(
+ actionProgress,
+ [0, 0.2, 0.4, 1],
+ [1, 0.96, 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 ${launchY})`}>
+ <path
+ d={SHAFT_DRAW}
+ strokeDasharray={shaft.strokeDasharray}
+ strokeDashoffset={shaft.strokeDashoffset}
+ />
+ <path
+ d={HEAD_PATH}
+ strokeDasharray={head.strokeDasharray}
+ strokeDashoffset={head.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function UploadIconStatic({
+ 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={HEAD_PATH} />
+ <path d={TRAY_STATIC} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index ebd4d829..36c40448 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1488,6 +1488,21 @@
"target": "components/remocn/icon-download.tsx"
}
]
+ },
+ {
+ "name": "icon-upload",
+ "type": "registry:component",
+ "title": "Upload",
+ "description": "Animated Lucide upload icon — the tray draws on, the arrow fades in, then launches upward with a spring for an upload, publish, or submission beat.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-upload/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-upload.tsx"
+ }
+ ]
}
]
}