Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon gift
dev_wandryd3acf18c3bf2
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 90344e7e..d5146a85 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -39,6 +39,7 @@ import { FileTextIconStatic } from "@/registry/remocn/icon-file-text";import { FilterIconStatic } from "@/registry/remocn/icon-filter";import { FlameIconStatic } from "@/registry/remocn/icon-flame";import { FolderIconStatic } from "@/registry/remocn/icon-folder";+import { GiftIconStatic } from "@/registry/remocn/icon-gift";import { GlobeIconStatic } from "@/registry/remocn/icon-globe";import { HeartIconStatic } from "@/registry/remocn/icon-heart";import { HelpCircleIconStatic } from "@/registry/remocn/icon-help-circle";@@ -308,6 +309,12 @@ export const ICONS: IconEntry[] = [category: "Commerce",Static: PackageIconStatic,},+ {+ name: "icon-gift",+ label: "Gift",+ category: "Commerce",+ Static: GiftIconStatic,+ },{name: "icon-search",label: "Search",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 2017ef57..6050e7ac 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -55,6 +55,7 @@ import { iconFileTextConfig } from "@/registry/remocn/icon-file-text/config";import { iconFilterConfig } from "@/registry/remocn/icon-filter/config";import { iconFlameConfig } from "@/registry/remocn/icon-flame/config";import { iconFolderConfig } from "@/registry/remocn/icon-folder/config";+import { iconGiftConfig } from "@/registry/remocn/icon-gift/config";import { iconGlobeConfig } from "@/registry/remocn/icon-globe/config";import { iconHeartConfig } from "@/registry/remocn/icon-heart/config";import { iconHelpCircleConfig } from "@/registry/remocn/icon-help-circle/config";@@ -855,6 +856,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconFolderConfig,},+ "icon-gift": {+ load: () =>+ import("@/registry/remocn/icon-gift").then((m) => ({+ default: m.GiftIcon,+ })),+ config: iconGiftConfig,+ },"icon-globe": {load: () =>import("@/registry/remocn/icon-globe").then((m) => ({diff --git a/registry/remocn/icon-gift/config.ts b/registry/remocn/icon-gift/config.tsnew file mode 100644index 00000000..a8a93a41--- /dev/null+++ b/registry/remocn/icon-gift/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconGiftConfig: ComponentConfig = {+ componentName: "GiftIcon",+ importPath: "@/components/remocn/icon-gift",+ 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: 80,+ fps: FPS,+ compositionWidth: 48,+ compositionHeight: 48,+};diff --git a/registry/remocn/icon-gift/index.tsx b/registry/remocn/icon-gift/index.tsxnew file mode 100644index 00000000..b8ebd756--- /dev/null+++ b/registry/remocn/icon-gift/index.tsx@@ -0,0 +1,167 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const BOX_PATH = "M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8";+const LID_PATH =+ "M4 7H20A1 1 0 0 1 21 8V10A1 1 0 0 1 20 11H4A1 1 0 0 1 3 10V8A1 1 0 0 1 4 7Z";+const CENTER_TOP_PATH = "M12 7V11";+const CENTER_BOTTOM_PATH = "M12 11V21";+const BOW_PATH =+ "M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5";++const LID_CX = 12;+const LID_CY = 9;++const TIMINGS = {+ drawDurationInFrames: 18,+ actionDelayInFrames: 2,+ actionDurationInFrames: 28,+ loop: false,+} as const;++export function GiftIcon({+ 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 boxDraw = interpolate(linearDraw, [0, 0.55], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const lidDraw = interpolate(linearDraw, [0.35, 0.7], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const ribbonDraw = interpolate(linearDraw, [0.6, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const lidLift = acting+ ? interpolate(actionProgress, [0, 0.4, 0.65], [0, -2.5, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 0;+ const lidTilt = acting+ ? interpolate(actionProgress, [0, 0.4, 0.65], [0, 3, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 0;+ const lidPop = acting+ ? interpolate(actionProgress, [0.6, 0.78, 1], [1, 1.06, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;++ const box = drawnPathProps(BOX_PATH, acting ? 1 : boxDraw);+ const lid = drawnPathProps(LID_PATH, acting ? 1 : lidDraw);+ const centerTop = drawnPathProps(CENTER_TOP_PATH, acting ? 1 : ribbonDraw);+ const centerBottom = drawnPathProps(CENTER_BOTTOM_PATH, acting ? 1 : ribbonDraw);+ const bow = drawnPathProps(BOW_PATH, acting ? 1 : ribbonDraw);++ const scale = 0.85 + 0.15 * scaleIn;+ const lidTransform = `translate(0 ${lidLift}) rotate(${lidTilt} ${LID_CX} ${LID_CY}) translate(${LID_CX * (1 - lidPop)} ${LID_CY * (1 - lidPop)}) scale(${lidPop})`;++ 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={BOX_PATH}+ strokeDasharray={box.strokeDasharray}+ strokeDashoffset={box.strokeDashoffset}+ />+ <path+ d={CENTER_BOTTOM_PATH}+ strokeDasharray={centerBottom.strokeDasharray}+ strokeDashoffset={centerBottom.strokeDashoffset}+ />+ <g transform={lidTransform}>+ <path+ d={LID_PATH}+ strokeDasharray={lid.strokeDasharray}+ strokeDashoffset={lid.strokeDashoffset}+ />+ <path+ d={CENTER_TOP_PATH}+ strokeDasharray={centerTop.strokeDasharray}+ strokeDashoffset={centerTop.strokeDashoffset}+ />+ <path+ d={BOW_PATH}+ strokeDasharray={bow.strokeDasharray}+ strokeDashoffset={bow.strokeDashoffset}+ />+ </g>+ </svg>+ );+}++export function GiftIconStatic({+ 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="M12 7v14" />+ <path d={BOX_PATH} />+ <path d={BOW_PATH} />+ <rect x="3" y="7" width="18" height="4" rx="1" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 658bca64..398b0bd1 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2569,6 +2569,21 @@}]},+ {+ "name": "icon-gift",+ "type": "registry:component",+ "title": "Gift",+ "description": "Animated Lucide gift icon — draws on, then the lid lifts for a peek and lands with a ribbon pop: almost unwrapped.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-gift/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-gift.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",