Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon sun
dev_wandryfbbf24d89d5f
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex a844f8df..8b27911e 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -75,6 +75,7 @@ import { SkipForwardIconStatic } from "@/registry/remocn/icon-skip-forward";import { SmartphoneIconStatic } from "@/registry/remocn/icon-smartphone";import { SparklesIconStatic } from "@/registry/remocn/icon-sparkles";import { StarIconStatic } from "@/registry/remocn/icon-star";+import { SunIconStatic } from "@/registry/remocn/icon-sun";import { TerminalIconStatic } from "@/registry/remocn/icon-terminal";import { ThumbsUpIconStatic } from "@/registry/remocn/icon-thumbs-up";import { TimerIconStatic } from "@/registry/remocn/icon-timer";@@ -259,6 +260,12 @@ export const ICONS: IconEntry[] = [category: "Devices & theme",Static: SmartphoneIconStatic,},+ {+ name: "icon-sun",+ label: "Sun",+ category: "Devices & theme",+ Static: SunIconStatic,+ },{name: "icon-search",label: "Search",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 7709e2a6..20fdbe7c 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -91,6 +91,7 @@ import { iconSkipForwardConfig } from "@/registry/remocn/icon-skip-forward/confiimport { iconSmartphoneConfig } from "@/registry/remocn/icon-smartphone/config";import { iconSparklesConfig } from "@/registry/remocn/icon-sparkles/config";import { iconStarConfig } from "@/registry/remocn/icon-star/config";+import { iconSunConfig } from "@/registry/remocn/icon-sun/config";import { iconTerminalConfig } from "@/registry/remocn/icon-terminal/config";import { iconThumbsUpConfig } from "@/registry/remocn/icon-thumbs-up/config";import { iconTimerConfig } from "@/registry/remocn/icon-timer/config";@@ -1100,6 +1101,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconStarConfig,},+ "icon-sun": {+ load: () =>+ import("@/registry/remocn/icon-sun").then((m) => ({+ default: m.SunIcon,+ })),+ config: iconSunConfig,+ },"icon-terminal": {load: () =>import("@/registry/remocn/icon-terminal").then((m) => ({diff --git a/registry/remocn/icon-sun/config.ts b/registry/remocn/icon-sun/config.tsnew file mode 100644index 00000000..c9d89f29--- /dev/null+++ b/registry/remocn/icon-sun/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconSunConfig: ComponentConfig = {+ componentName: "SunIcon",+ importPath: "@/components/remocn/icon-sun",+ 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-sun/index.tsx b/registry/remocn/icon-sun/index.tsxnew file mode 100644index 00000000..db9184f7--- /dev/null+++ b/registry/remocn/icon-sun/index.tsx@@ -0,0 +1,140 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const CORE_PATH = "M12 8a4 4 0 1 0 0 8 4 4 0 1 0 0-8Z";++const RAYS = [+ "M12 4 12 2",+ "M17.66 6.34 19.07 4.93",+ "M20 12 22 12",+ "M17.66 17.66 19.07 19.07",+ "M12 20 12 22",+ "M6.34 17.66 4.93 19.07",+ "M4 12 2 12",+ "M6.34 6.34 4.93 4.93",+];++const CENTER = 12;++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 30,+ loop: false,+} as const;++export function SunIcon({+ animation = "both",+ loop,+ speed,+ size = 48,+ color = "currentColor",+ strokeWidth = 2,+ className,+}: IconAnimationProps) {+ const { drawProgress, scaleIn, actionProgress, actionFrame } =+ useIconAnimation({ animation, loop, speed }, TIMINGS);++ const acting = animation !== "draw" && actionFrame >= 0;++ const corePop = acting+ ? interpolate(actionProgress, [0.55, 0.75, 1], [1, 1.08, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;++ const core = drawnPathProps(CORE_PATH, drawProgress);++ const rays = RAYS.map((d, i) => {+ const start = i * 0.07;+ const rayFan = interpolate(actionProgress, [start, start + 0.28], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const progress = animation === "draw" ? 1 : acting ? rayFan : 0;+ return { d, ...drawnPathProps(d, progress) };+ });++ const scale = 0.85 + 0.15 * scaleIn;+ const coreTransform = `translate(${CENTER * (1 - corePop)} ${CENTER * (1 - corePop)}) scale(${corePop})`;++ 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})`,+ }}+ >+ {rays.map((ray) => (+ <path+ key={ray.d}+ d={ray.d}+ strokeDasharray={ray.strokeDasharray}+ strokeDashoffset={ray.strokeDashoffset}+ />+ ))}+ <g transform={coreTransform}>+ <path+ d={CORE_PATH}+ strokeDasharray={core.strokeDasharray}+ strokeDashoffset={core.strokeDashoffset}+ />+ </g>+ </svg>+ );+}++export function SunIconStatic({+ 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"+ >+ <circle cx="12" cy="12" r="4" />+ <path d="M12 2v2" />+ <path d="M12 20v2" />+ <path d="m4.93 4.93 1.41 1.41" />+ <path d="m17.66 17.66 1.41 1.41" />+ <path d="M2 12h2" />+ <path d="M20 12h2" />+ <path d="m6.34 17.66-1.41 1.41" />+ <path d="m19.07 4.93-1.41 1.41" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 59e0318d..7ada9a4f 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2464,6 +2464,21 @@}]},+ {+ "name": "icon-sun",+ "type": "registry:component",+ "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": "icon-sun/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-sun.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",