Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon sparkles
dev_wandry257c402a90d7
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 87ec1c1c..a32c7b7b 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -21,6 +21,7 @@ import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";import { SearchIconStatic } from "@/registry/remocn/icon-search";import { SendIconStatic } from "@/registry/remocn/icon-send";import { SettingsIconStatic } from "@/registry/remocn/icon-settings";+import { SparklesIconStatic } from "@/registry/remocn/icon-sparkles";import { StarIconStatic } from "@/registry/remocn/icon-star";import { TrashIconStatic } from "@/registry/remocn/icon-trash";import { UploadIconStatic } from "@/registry/remocn/icon-upload";@@ -152,6 +153,12 @@ export const ICONS: IconEntry[] = [category: "Emotion & accents",Static: StarIconStatic,},+ {+ name: "icon-sparkles",+ label: "Sparkles",+ category: "Emotion & accents",+ Static: SparklesIconStatic,+ },];const CATEGORY_ORDER: IconCategory[] = [diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex a8268bfe..95bc505b 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -38,6 +38,7 @@ import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/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";+import { iconSparklesConfig } from "@/registry/remocn/icon-sparkles/config";import { iconStarConfig } from "@/registry/remocn/icon-star/config";import { iconTrashConfig } from "@/registry/remocn/icon-trash/config";import { iconUploadConfig } from "@/registry/remocn/icon-upload/config";@@ -666,6 +667,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconSettingsConfig,},+ "icon-sparkles": {+ load: () =>+ import("@/registry/remocn/icon-sparkles").then((m) => ({+ default: m.SparklesIcon,+ })),+ config: iconSparklesConfig,+ },"icon-star": {load: () =>import("@/registry/remocn/icon-star").then((m) => ({diff --git a/registry/remocn/icon-sparkles/config.ts b/registry/remocn/icon-sparkles/config.tsnew file mode 100644index 00000000..402e21c2--- /dev/null+++ b/registry/remocn/icon-sparkles/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconSparklesConfig: ComponentConfig = {+ componentName: "SparklesIcon",+ importPath: "@/components/remocn/icon-sparkles",+ controls: {+ animation: {+ type: "select",+ default: "both",+ options: ["draw", "action", "both"],+ label: "Animation",+ },+ loop: {+ type: "boolean",+ default: true,+ 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: 90,+ fps: FPS,+ compositionWidth: 48,+ compositionHeight: 48,+};diff --git a/registry/remocn/icon-sparkles/index.tsx b/registry/remocn/icon-sparkles/index.tsxnew file mode 100644index 00000000..d98476fa--- /dev/null+++ b/registry/remocn/icon-sparkles/index.tsx@@ -0,0 +1,146 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const MAIN_PATH =+ "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z";+const ACCENT_TR_V = "M20 2v4";+const ACCENT_TR_H = "M22 4h-4";++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 45,+ loop: true,+} as const;++export function SparklesIcon({+ animation = "both",+ loop,+ speed,+ size = 48,+ color = "currentColor",+ strokeWidth = 2,+ className,+}: IconAnimationProps) {+ const { drawProgress, scaleIn, actionProgress } = useIconAnimation(+ { animation, loop, speed },+ TIMINGS,+ );++ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);++ const mainProgress = interpolate(linearDraw, [0, 0.857], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });+ const popTR = interpolate(linearDraw, [0.55, 0.714], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.back(1.8)),+ });+ const popBL = interpolate(linearDraw, [0.857, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.back(1.8)),+ });++ const main = drawnPathProps(MAIN_PATH, mainProgress);++ const mainPulse = interpolate(actionProgress, [0, 0.5, 1], [1, 1.08, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });+ const smallPulse = interpolate(actionProgress, [0, 0.5, 1], [1, 0.7, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });+ const smallOpacity = interpolate(actionProgress, [0, 0.5, 1], [1, 0.5, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });++ const scale = 0.85 + 0.15 * scaleIn;+ const trScale = popTR * smallPulse;+ const blScale = popBL * smallPulse;++ 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={`translate(12 12) scale(${mainPulse}) translate(-12 -12)`}>+ <path+ d={MAIN_PATH}+ strokeDasharray={main.strokeDasharray}+ strokeDashoffset={main.strokeDashoffset}+ />+ </g>+ <g+ opacity={smallOpacity}+ transform={`translate(20 4) scale(${trScale}) translate(-20 -4)`}+ >+ <path d={ACCENT_TR_V} />+ <path d={ACCENT_TR_H} />+ </g>+ <g+ opacity={smallOpacity}+ transform={`translate(4 20) scale(${blScale}) translate(-4 -20)`}+ >+ <circle cx="4" cy="20" r="2" />+ </g>+ </svg>+ );+}++export function SparklesIconStatic({+ 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={MAIN_PATH} />+ <path d={ACCENT_TR_V} />+ <path d={ACCENT_TR_H} />+ <circle cx="4" cy="20" r="2" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 29a12aaa..e004ee3f 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -1608,6 +1608,21 @@"target": "components/remocn/icon-star.tsx"}]+ },+ {+ "name": "icon-sparkles",+ "type": "registry:component",+ "title": "Sparkles",+ "description": "Animated Lucide sparkles icon — the main sparkle draws on, the accents pop, then a looping twinkle for AI, magic, or premium highlights. Loops by default.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-sparkles/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-sparkles.tsx"+ }+ ]}]}