Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon trophy
dev_wandry174618745d23
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex c5c08163..c9e8ef6e 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -94,6 +94,7 @@ import { ZapIconStatic } from "@/registry/remocn/icon-zap";import { TrashIconStatic } from "@/registry/remocn/icon-trash";import { TrendingDownIconStatic } from "@/registry/remocn/icon-trending-down";import { TrendingUpIconStatic } from "@/registry/remocn/icon-trending-up";+import { TrophyIconStatic } from "@/registry/remocn/icon-trophy";import { UploadIconStatic } from "@/registry/remocn/icon-upload";import { UserPlusIconStatic } from "@/registry/remocn/icon-user-plus";import { UserIconStatic } from "@/registry/remocn/icon-user";@@ -616,6 +617,12 @@ export const ICONS: IconEntry[] = [category: "Emotion & accents",Static: RocketIconStatic,},+ {+ name: "icon-trophy",+ label: "Trophy",+ category: "Emotion & accents",+ Static: TrophyIconStatic,+ },{name: "icon-star",label: "Star",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 5295d52a..6bd5ce82 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -109,6 +109,7 @@ import { iconTimerConfig } from "@/registry/remocn/icon-timer/config";import { iconTrashConfig } from "@/registry/remocn/icon-trash/config";import { iconTrendingDownConfig } from "@/registry/remocn/icon-trending-down/config";import { iconTrendingUpConfig } from "@/registry/remocn/icon-trending-up/config";+import { iconTrophyConfig } from "@/registry/remocn/icon-trophy/config";import { iconUploadConfig } from "@/registry/remocn/icon-upload/config";import { iconUserPlusConfig } from "@/registry/remocn/icon-user-plus/config";import { iconUserConfig } from "@/registry/remocn/icon-user/config";@@ -1241,6 +1242,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconTrendingUpConfig,},+ "icon-trophy": {+ load: () =>+ import("@/registry/remocn/icon-trophy").then((m) => ({+ default: m.TrophyIcon,+ })),+ config: iconTrophyConfig,+ },"icon-upload": {load: () =>import("@/registry/remocn/icon-upload").then((m) => ({diff --git a/registry/remocn/icon-trophy/config.ts b/registry/remocn/icon-trophy/config.tsnew file mode 100644index 00000000..b4feda82--- /dev/null+++ b/registry/remocn/icon-trophy/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconTrophyConfig: ComponentConfig = {+ componentName: "TrophyIcon",+ importPath: "@/components/remocn/icon-trophy",+ 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: 85,+ fps: FPS,+ compositionWidth: 48,+ compositionHeight: 48,+};diff --git a/registry/remocn/icon-trophy/index.tsx b/registry/remocn/icon-trophy/index.tsxnew file mode 100644index 00000000..56fb05f9--- /dev/null+++ b/registry/remocn/icon-trophy/index.tsx@@ -0,0 +1,170 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const CUP_PATH = "M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z";+const LEG_LEFT_PATH =+ "M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978";+const LEG_RIGHT_PATH =+ "M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978";+const BASE_PATH = "M4 22h16";+const HANDLE_LEFT_PATH = "M6 9H4.5a1 1 0 0 1 0-5H6";+const HANDLE_RIGHT_PATH = "M18 9h1.5a1 1 0 0 0 0-5H18";++const CENTER = 12;++const TIMINGS = {+ drawDurationInFrames: 18,+ actionDelayInFrames: 2,+ actionDurationInFrames: 24,+ loop: false,+} as const;++export function TrophyIcon({+ 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 cupDraw = interpolate(linearDraw, [0, 0.78], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const legDraw = interpolate(linearDraw, [0.56, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const hop = acting+ ? interpolate(actionProgress, [0, 0.4, 1], [0, -3, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 0;+ const pop = acting+ ? interpolate(actionProgress, [0, 0.4, 0.75, 1], [1, 1.08, 1, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;+ const handleDraw = acting+ ? interpolate(actionProgress, [0.1, 0.6], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ })+ : 0;++ const cup = drawnPathProps(CUP_PATH, acting ? 1 : cupDraw);+ const legLeft = drawnPathProps(LEG_LEFT_PATH, acting ? 1 : legDraw);+ const legRight = drawnPathProps(LEG_RIGHT_PATH, acting ? 1 : legDraw);+ const base = drawnPathProps(BASE_PATH, acting ? 1 : legDraw);+ const handleLeft = drawnPathProps(HANDLE_LEFT_PATH, handleDraw);+ const handleRight = drawnPathProps(HANDLE_RIGHT_PATH, handleDraw);++ const scale = 0.85 + 0.15 * scaleIn;+ const hoistTransform = `translate(${CENTER * (1 - pop)} ${CENTER * (1 - pop) + hop}) scale(${pop})`;++ 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={hoistTransform}>+ <path+ d={HANDLE_LEFT_PATH}+ strokeDasharray={handleLeft.strokeDasharray}+ strokeDashoffset={handleLeft.strokeDashoffset}+ />+ <path+ d={HANDLE_RIGHT_PATH}+ strokeDasharray={handleRight.strokeDasharray}+ strokeDashoffset={handleRight.strokeDashoffset}+ />+ <path+ d={CUP_PATH}+ strokeDasharray={cup.strokeDasharray}+ strokeDashoffset={cup.strokeDashoffset}+ />+ <path+ d={LEG_LEFT_PATH}+ strokeDasharray={legLeft.strokeDasharray}+ strokeDashoffset={legLeft.strokeDashoffset}+ />+ <path+ d={LEG_RIGHT_PATH}+ strokeDasharray={legRight.strokeDasharray}+ strokeDashoffset={legRight.strokeDashoffset}+ />+ <path+ d={BASE_PATH}+ strokeDasharray={base.strokeDasharray}+ strokeDashoffset={base.strokeDashoffset}+ />+ </g>+ </svg>+ );+}++export function TrophyIconStatic({+ 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="M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978" />+ <path d="M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978" />+ <path d="M18 9h1.5a1 1 0 0 0 0-5H18" />+ <path d="M4 22h16" />+ <path d="M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z" />+ <path d="M6 9H4.5a1 1 0 0 1 0-5H6" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex bc3365e1..8a0b72d1 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2689,6 +2689,21 @@}]},+ {+ "name": "icon-trophy",+ "type": "registry:component",+ "title": "Trophy",+ "description": "Animated Lucide trophy icon — draws on, then hoists: the cup hops with a pop at the apex while its handles flash in.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-trophy/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-trophy.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",