Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon refresh
dev_wandry4e9fe57c5989
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 3f5203f2..00e72dab 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -12,6 +12,7 @@ import { CheckCircleIconStatic } from "@/registry/remocn/icon-check-circle";import { CheckIconStatic } from "@/registry/remocn/icon-check";import { InfoIconStatic } from "@/registry/remocn/icon-info";import { LoaderIconStatic } from "@/registry/remocn/icon-loader";+import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";import { XIconStatic } from "@/registry/remocn/icon-x";export type IconCategory =@@ -68,6 +69,12 @@ export const ICONS: IconEntry[] = [category: "Status & feedback",Static: LoaderIconStatic,},+ {+ name: "icon-refresh-cw",+ label: "Refresh Cw",+ category: "Status & feedback",+ Static: RefreshCwIconStatic,+ },];const CATEGORY_ORDER: IconCategory[] = [diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex d99a6dd5..2e4254bb 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -29,6 +29,7 @@ import { iconCheckCircleConfig } from "@/registry/remocn/icon-check-circle/confiimport { iconCheckConfig } from "@/registry/remocn/icon-check/config";import { iconInfoConfig } from "@/registry/remocn/icon-info/config";import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";+import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/config";import { iconXConfig } from "@/registry/remocn/icon-x/config";import { infiniteBentoPanConfig } from "@/registry/remocn/infinite-bento-pan/config";import { infiniteMarqueeConfig } from "@/registry/remocn/infinite-marquee/config";@@ -591,6 +592,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconLoaderConfig,},+ "icon-refresh-cw": {+ load: () =>+ import("@/registry/remocn/icon-refresh-cw").then((m) => ({+ default: m.RefreshCwIcon,+ })),+ config: iconRefreshCwConfig,+ },"icon-check-circle": {load: () =>import("@/registry/remocn/icon-check-circle").then((m) => ({diff --git a/registry/remocn/icon-refresh-cw/config.ts b/registry/remocn/icon-refresh-cw/config.tsnew file mode 100644index 00000000..9d7d9862--- /dev/null+++ b/registry/remocn/icon-refresh-cw/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconRefreshCwConfig: ComponentConfig = {+ componentName: "RefreshCwIcon",+ importPath: "@/components/remocn/icon-refresh-cw",+ 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-refresh-cw/index.tsx b/registry/remocn/icon-refresh-cw/index.tsxnew file mode 100644index 00000000..09de627c--- /dev/null+++ b/registry/remocn/icon-refresh-cw/index.tsx@@ -0,0 +1,144 @@+"use client";++import { Easing, interpolate, spring, useVideoConfig } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const ARC_TOP = "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8";+const ARROW_TOP = "M21 3v5h-5";+const ARC_BOTTOM = "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16";+const ARROW_BOTTOM = "M8 16H3v5";++const SPIN_EASE = Easing.bezier(0.45, 0, 0.25, 1);++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 55,+ loop: true,+} as const;++export function RefreshCwIcon({+ animation = "both",+ loop,+ speed,+ size = 48,+ color = "currentColor",+ strokeWidth = 2,+ className,+}: IconAnimationProps) {+ const { drawProgress, scaleIn, actionFrame, cycleIndex } = useIconAnimation(+ { animation, loop, speed },+ TIMINGS,+ );+ const { fps } = useVideoConfig();++ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);++ const arcProgress = interpolate(linearDraw, [0, 0.857], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });+ const arrowTopPop = interpolate(linearDraw, [0.6, 0.714], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.back(1.8)),+ });+ const arrowBottomPop = interpolate(linearDraw, [0.76, 0.857], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.back(1.8)),+ });++ const arcTop = drawnPathProps(ARC_TOP, arcProgress);+ const arcBottom = drawnPathProps(ARC_BOTTOM, arcProgress);++ const resolvedLoop = loop ?? TIMINGS.loop;+ const rotate = resolvedLoop+ ? cycleIndex * 360 ++ interpolate(actionFrame, [0, 44], [0, 360], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: SPIN_EASE,+ })+ : 360 *+ spring({+ frame: actionFrame,+ fps,+ config: { damping: 14, stiffness: 120, mass: 0.9 },+ durationInFrames: 44,+ });++ 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: `rotate(${rotate}deg) scale(${scale})`,+ }}+ >+ <path+ d={ARC_TOP}+ strokeDasharray={arcTop.strokeDasharray}+ strokeDashoffset={arcTop.strokeDashoffset}+ />+ <path+ d={ARC_BOTTOM}+ strokeDasharray={arcBottom.strokeDasharray}+ strokeDashoffset={arcBottom.strokeDashoffset}+ />+ <g transform={`translate(21 8) scale(${arrowTopPop}) translate(-21 -8)`}>+ <path d={ARROW_TOP} />+ </g>+ <g transform={`translate(3 16) scale(${arrowBottomPop}) translate(-3 -16)`}>+ <path d={ARROW_BOTTOM} />+ </g>+ </svg>+ );+}++export function RefreshCwIconStatic({+ 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={ARC_TOP} />+ <path d={ARROW_TOP} />+ <path d={ARC_BOTTOM} />+ <path d={ARROW_BOTTOM} />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 84f9d93e..3f355834 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -1428,6 +1428,21 @@"target": "components/remocn/icon-loader.tsx"}]+ },+ {+ "name": "icon-refresh-cw",+ "type": "registry:component",+ "title": "Refresh Cw",+ "description": "Animated Lucide refresh-cw icon — the two arcs draw on, arrowheads pop, then the whole mark spins in cycles for sync, retry, or up-to-date messaging. Loops by default.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-refresh-cw/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-refresh-cw.tsx"+ }+ ]}]}