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-gem",
"title": "Gem",
"description": "Animated Lucide gem icon — the stone draws on, then light catches it: facets re-trace in sequence with a flicker and a pop.",
"dependencies": ["remotion"],
"registryDependencies": ["@remocn/icons-core"],
"files": [
{
"path": "registry/remocn-icons/icon-gem/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 STONE_PATH =\n \"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z\";\nconst VCUT_PATH = \"M10.5 3 8 9l4 13 4-13-2.5-6\";\nconst BAND_PATH = \"M2 9h20\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nexport function GemIcon({\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 linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const stoneDraw = interpolate(linearDraw, [0, 0.67], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const vcutDraw = interpolate(linearDraw, [0.44, 0.89], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const bandDraw = interpolate(linearDraw, [0.67, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const pop = acting\n ? interpolate(actionProgress, [0, 0.35, 0.6, 1], [1, 1.06, 1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const shimmer = acting\n ? interpolate(\n actionProgress,\n [0, 0.25, 0.45, 0.65, 0.85, 1],\n [1, 0.7, 1, 0.78, 1, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n },\n )\n : 1;\n\n const stone = drawnPathProps(STONE_PATH, acting ? 1 : stoneDraw);\n const vcut = drawnPathProps(VCUT_PATH, acting ? 1 : vcutDraw);\n const band = drawnPathProps(BAND_PATH, acting ? 1 : bandDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const popTransform = `translate(${CENTER * (1 - pop)} ${CENTER * (1 - pop)}) scale(${pop})`;\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 <g transform={popTransform}>\n <path\n d={STONE_PATH}\n strokeDasharray={stone.strokeDasharray}\n strokeDashoffset={stone.strokeDashoffset}\n />\n <g opacity={shimmer}>\n <path\n d={VCUT_PATH}\n strokeDasharray={vcut.strokeDasharray}\n strokeDashoffset={vcut.strokeDashoffset}\n />\n <path\n d={BAND_PATH}\n strokeDasharray={band.strokeDasharray}\n strokeDashoffset={band.strokeDashoffset}\n />\n </g>\n </g>\n </svg>\n );\n}\n\nexport function GemIconStatic({\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 <path d=\"M10.5 3 8 9l4 13 4-13-2.5-6\" />\n <path d=\"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z\" />\n <path d=\"M2 9h20\" />\n </svg>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/icon-gem.tsx"
}
],
"type": "registry:component"
}