Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon moon
dev_wandry19000ba6e2aa
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 8b27911e..04a0e692 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -56,6 +56,7 @@ import { MenuIconStatic } from "@/registry/remocn/icon-menu";import { MessageCircleIconStatic } from "@/registry/remocn/icon-message-circle";import { MicIconStatic } from "@/registry/remocn/icon-mic";import { MonitorIconStatic } from "@/registry/remocn/icon-monitor";+import { MoonIconStatic } from "@/registry/remocn/icon-moon";import { MoreHorizontalIconStatic } from "@/registry/remocn/icon-more-horizontal";import { PartyPopperIconStatic } from "@/registry/remocn/icon-party-popper";import { PauseIconStatic } from "@/registry/remocn/icon-pause";@@ -266,6 +267,12 @@ export const ICONS: IconEntry[] = [category: "Devices & theme",Static: SunIconStatic,},+ {+ name: "icon-moon",+ label: "Moon",+ category: "Devices & theme",+ Static: MoonIconStatic,+ },{name: "icon-search",label: "Search",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 20fdbe7c..a028ab68 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -72,6 +72,7 @@ import { iconMenuConfig } from "@/registry/remocn/icon-menu/config";import { iconMessageCircleConfig } from "@/registry/remocn/icon-message-circle/config";import { iconMicConfig } from "@/registry/remocn/icon-mic/config";import { iconMonitorConfig } from "@/registry/remocn/icon-monitor/config";+import { iconMoonConfig } from "@/registry/remocn/icon-moon/config";import { iconMoreHorizontalConfig } from "@/registry/remocn/icon-more-horizontal/config";import { iconPartyPopperConfig } from "@/registry/remocn/icon-party-popper/config";import { iconPauseConfig } from "@/registry/remocn/icon-pause/config";@@ -968,6 +969,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconMonitorConfig,},+ "icon-moon": {+ load: () =>+ import("@/registry/remocn/icon-moon").then((m) => ({+ default: m.MoonIcon,+ })),+ config: iconMoonConfig,+ },"icon-more-horizontal": {load: () =>import("@/registry/remocn/icon-more-horizontal").then((m) => ({diff --git a/registry/remocn/icon-moon/config.ts b/registry/remocn/icon-moon/config.tsnew file mode 100644index 00000000..4eb5b579--- /dev/null+++ b/registry/remocn/icon-moon/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconMoonConfig: ComponentConfig = {+ componentName: "MoonIcon",+ importPath: "@/components/remocn/icon-moon",+ 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: 70,+ fps: FPS,+ compositionWidth: 48,+ compositionHeight: 48,+};diff --git a/registry/remocn/icon-moon/index.tsx b/registry/remocn/icon-moon/index.tsxnew file mode 100644index 00000000..583cc09b--- /dev/null+++ b/registry/remocn/icon-moon/index.tsx@@ -0,0 +1,107 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const MOON_PATH =+ "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401";++const CENTER = 12;++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 24,+ loop: false,+} as const;++export function MoonIcon({+ 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 settle = acting+ ? interpolate(+ actionProgress,+ [0, 0.2, 0.5, 0.78, 1],+ [0, -16, 9, -3, 0],+ {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.sin),+ },+ )+ : 0;++ const moon = drawnPathProps(MOON_PATH, drawProgress);++ const scale = 0.85 + 0.15 * scaleIn;++ 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={`rotate(${settle} ${CENTER} ${CENTER})`}>+ <path+ d={MOON_PATH}+ strokeDasharray={moon.strokeDasharray}+ strokeDashoffset={moon.strokeDashoffset}+ />+ </g>+ </svg>+ );+}++export function MoonIconStatic({+ 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={MOON_PATH} />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 7ada9a4f..8a343904 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2479,6 +2479,21 @@}]},+ {+ "name": "icon-moon",+ "type": "registry:component",+ "title": "Moon",+ "description": "Animated Lucide moon icon — draws on, then rocks gently into place: settling in for the night.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-moon/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-moon.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",