Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon save
dev_wandrye7ac3fce87e1
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex b7efd4b4..74a36807 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -43,6 +43,7 @@ import { PencilIconStatic } from "@/registry/remocn/icon-pencil";import { PlayIconStatic } from "@/registry/remocn/icon-play";import { PlusIconStatic } from "@/registry/remocn/icon-plus";import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";+import { SaveIconStatic } from "@/registry/remocn/icon-save";import { SearchIconStatic } from "@/registry/remocn/icon-search";import { SendIconStatic } from "@/registry/remocn/icon-send";import { Share2IconStatic } from "@/registry/remocn/icon-share-2";@@ -234,6 +235,12 @@ export const ICONS: IconEntry[] = [category: "Actions & UI",Static: EyeOffIconStatic,},+ {+ name: "icon-save",+ label: "Save",+ category: "Actions & UI",+ Static: SaveIconStatic,+ },{name: "icon-play",label: "Play",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 15603ca3..42ec0e57 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -59,6 +59,7 @@ import { iconPencilConfig } from "@/registry/remocn/icon-pencil/config";import { iconPlayConfig } from "@/registry/remocn/icon-play/config";import { iconPlusConfig } from "@/registry/remocn/icon-plus/config";import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/config";+import { iconSaveConfig } from "@/registry/remocn/icon-save/config";import { iconSearchConfig } from "@/registry/remocn/icon-search/config";import { iconSendConfig } from "@/registry/remocn/icon-send/config";import { iconSettingsConfig } from "@/registry/remocn/icon-settings/config";@@ -845,6 +846,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconRefreshCwConfig,},+ "icon-save": {+ load: () =>+ import("@/registry/remocn/icon-save").then((m) => ({+ default: m.SaveIcon,+ })),+ config: iconSaveConfig,+ },"icon-search": {load: () =>import("@/registry/remocn/icon-search").then((m) => ({diff --git a/registry/remocn/icon-save/config.ts b/registry/remocn/icon-save/config.tsnew file mode 100644index 00000000..4af0852c--- /dev/null+++ b/registry/remocn/icon-save/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconSaveConfig: ComponentConfig = {+ componentName: "SaveIcon",+ importPath: "@/components/remocn/icon-save",+ 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-save/index.tsx b/registry/remocn/icon-save/index.tsxnew file mode 100644index 00000000..43be0515--- /dev/null+++ b/registry/remocn/icon-save/index.tsx@@ -0,0 +1,146 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const DISK_PATH =+ "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z";+const LABEL_PATH = "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7";+const SLOT_PATH = "M7 3v4a1 1 0 0 0 1 1h7";++const TIMINGS = {+ drawDurationInFrames: 18,+ actionDelayInFrames: 2,+ actionDurationInFrames: 18,+ loop: false,+} as const;++export function SaveIcon({+ 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 acting = animation !== "draw" && actionFrame >= 0;++ const diskDraw = interpolate(linearDraw, [0, 0.667], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const labelDraw = interpolate(linearDraw, [0.444, 0.889], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const slotDraw = interpolate(linearDraw, [0.667, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const slotProgress = acting+ ? interpolate(actionProgress, [0.25, 0.75], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ })+ : slotDraw;++ const squash = acting+ ? interpolate(actionProgress, [0, 0.3, 0.6], [1, 0.92, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;+ const dip = acting+ ? interpolate(actionProgress, [0, 0.3, 0.6], [0, -1.5, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 0;++ const disk = drawnPathProps(DISK_PATH, diskDraw);+ const label = drawnPathProps(LABEL_PATH, labelDraw);+ const slot = drawnPathProps(SLOT_PATH, slotProgress);++ 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: `translateY(${dip}px) scale(${scale}) scaleY(${squash})`,+ }}+ >+ <path+ d={DISK_PATH}+ strokeDasharray={disk.strokeDasharray}+ strokeDashoffset={disk.strokeDashoffset}+ />+ <path+ d={LABEL_PATH}+ strokeDasharray={label.strokeDasharray}+ strokeDashoffset={label.strokeDashoffset}+ />+ <path+ d={SLOT_PATH}+ strokeDasharray={slot.strokeDasharray}+ strokeDashoffset={slot.strokeDashoffset}+ />+ </svg>+ );+}++export function SaveIconStatic({+ 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={DISK_PATH} />+ <path d={LABEL_PATH} />+ <path d={SLOT_PATH} />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 8d0d437d..3e0e0f8f 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2044,6 +2044,21 @@}]},+ {+ "name": "icon-save",+ "type": "registry:component",+ "title": "Save",+ "description": "Animated Lucide save icon — the disk draws on, then presses down and writes: the label slot re-draws as data commits.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-save/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-save.tsx"+ }+ ]+ },{"name": "icon-sparkles","type": "registry:component",