Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "icon-sun",
"title": "Sun",
"description": "Animated Lucide sun icon — the core draws on, then eight rays fan out clockwise and the sun swells: sunrise.",
"dependencies": ["remotion"],
"registryDependencies": ["@remocn/icons-core"],
"files": [
{
"path": "registry/remocn-icons/icon-sun/index.tsx",
"content": "\"use client\";\n\nimport { Easing, interpolate } from \"remotion\";\nimport {\n drawnPathProps,\n type IconAnimationProps,\n useIconAnimation,\n} from \"@/lib/remocn-icons\";\n\nconst CORE_PATH = \"M12 8a4 4 0 1 0 0 8 4 4 0 1 0 0-8Z\";\n\nconst RAYS = [\n \"M12 4 12 2\",\n \"M17.66 6.34 19.07 4.93\",\n \"M20 12 22 12\",\n \"M17.66 17.66 19.07 19.07\",\n \"M12 20 12 22\",\n \"M6.34 17.66 4.93 19.07\",\n \"M4 12 2 12\",\n \"M6.34 6.34 4.93 4.93\",\n];\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 30,\n loop: false,\n} as const;\n\nexport function SunIcon({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const corePop = acting\n ? interpolate(actionProgress, [0.55, 0.75, 1], [1, 1.08, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const core = drawnPathProps(CORE_PATH, drawProgress);\n\n const rays = RAYS.map((d, i) => {\n const start = i * 0.07;\n const rayFan = interpolate(actionProgress, [start, start + 0.28], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const progress = animation === \"draw\" ? 1 : acting ? rayFan : 0;\n return { d, ...drawnPathProps(d, progress) };\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n const coreTransform = `translate(${CENTER * (1 - corePop)} ${CENTER * (1 - corePop)}) scale(${corePop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n {rays.map((ray) => (\n <path\n key={ray.d}\n d={ray.d}\n strokeDasharray={ray.strokeDasharray}\n strokeDashoffset={ray.strokeDashoffset}\n />\n ))}\n <g transform={coreTransform}>\n <path\n d={CORE_PATH}\n strokeDasharray={core.strokeDasharray}\n strokeDashoffset={core.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nexport function SunIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2v2\" />\n <path d=\"M12 20v2\" />\n <path d=\"m4.93 4.93 1.41 1.41\" />\n <path d=\"m17.66 17.66 1.41 1.41\" />\n <path d=\"M2 12h2\" />\n <path d=\"M20 12h2\" />\n <path d=\"m6.34 17.66-1.41 1.41\" />\n <path d=\"m19.07 4.93-1.41 1.41\" />\n </svg>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/icon-sun.tsx"
}
],
"type": "registry:component"
}