Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: icon clock

dev_wandrybae40481e013
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index a3dd8309..e17040ee 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -24,6 +24,7 @@ import { ChevronDownIconStatic } from "@/registry/remocn/icon-chevron-down";
import { ChevronLeftIconStatic } from "@/registry/remocn/icon-chevron-left";
import { ChevronRightIconStatic } from "@/registry/remocn/icon-chevron-right";
import { ChevronUpIconStatic } from "@/registry/remocn/icon-chevron-up";
+import { ClockIconStatic } from "@/registry/remocn/icon-clock";
import { CopyIconStatic } from "@/registry/remocn/icon-copy";
import { DownloadIconStatic } from "@/registry/remocn/icon-download";
import { ExternalLinkIconStatic } from "@/registry/remocn/icon-external-link";
@@ -175,6 +176,12 @@ export const ICONS: IconEntry[] = [
category: "Time & planning",
Static: CalendarIconStatic,
},
+ {
+ name: "icon-clock",
+ label: "Clock",
+ category: "Time & planning",
+ Static: ClockIconStatic,
+ },
{
name: "icon-search",
label: "Search",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index b40ed9ce..ceb6e06f 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -40,6 +40,7 @@ import { iconChevronDownConfig } from "@/registry/remocn/icon-chevron-down/confi
import { iconChevronLeftConfig } from "@/registry/remocn/icon-chevron-left/config";
import { iconChevronRightConfig } from "@/registry/remocn/icon-chevron-right/config";
import { iconChevronUpConfig } from "@/registry/remocn/icon-chevron-up/config";
+import { iconClockConfig } from "@/registry/remocn/icon-clock/config";
import { iconCopyConfig } from "@/registry/remocn/icon-copy/config";
import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";
import { iconExternalLinkConfig } from "@/registry/remocn/icon-external-link/config";
@@ -731,6 +732,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconChevronUpConfig,
},
+ "icon-clock": {
+ load: () =>
+ import("@/registry/remocn/icon-clock").then((m) => ({
+ default: m.ClockIcon,
+ })),
+ config: iconClockConfig,
+ },
"icon-copy": {
load: () =>
import("@/registry/remocn/icon-copy").then((m) => ({
diff --git a/registry/remocn/icon-clock/config.ts b/registry/remocn/icon-clock/config.ts
new file mode 100644
index 00000000..a82ed873
--- /dev/null
+++ b/registry/remocn/icon-clock/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconClockConfig: ComponentConfig = {
+ componentName: "ClockIcon",
+ importPath: "@/components/remocn/icon-clock",
+ 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-clock/index.tsx b/registry/remocn/icon-clock/index.tsx
new file mode 100644
index 00000000..cb2386d4
--- /dev/null
+++ b/registry/remocn/icon-clock/index.tsx
@@ -0,0 +1,132 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const FACE_PATH = "M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z";
+const HANDS_PATH = "M12 6v6l4 2";
+const MINUTE_PATH = "M12 6V12";
+const HOUR_PATH = "M12 12 16 14";
+
+const CENTER = 12;
+const STEPS = 4;
+
+const TIMINGS = {
+ drawDurationInFrames: 16,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 40,
+ loop: true,
+} as const;
+
+export function ClockIcon({
+ animation = "both",
+ loop,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionProgress, actionFrame } =
+ useIconAnimation({ animation, loop, speed }, TIMINGS);
+
+ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);
+ const acting = animation !== "draw" && actionFrame >= 0;
+
+ const faceDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const handsDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const scaled = actionProgress * STEPS;
+ const stepIndex = Math.floor(scaled);
+ const frac = scaled - stepIndex;
+ const eased = interpolate(frac, [0, 0.55, 1], [0, 1, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const tick = acting ? ((stepIndex + eased) / STEPS) * 360 : 0;
+
+ const face = drawnPathProps(FACE_PATH, acting ? 1 : faceDraw);
+ const minute = drawnPathProps(MINUTE_PATH, acting ? 1 : handsDraw);
+ const hour = drawnPathProps(HOUR_PATH, acting ? 1 : handsDraw);
+
+ 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})`,
+ }}
+ >
+ <path
+ d={FACE_PATH}
+ strokeDasharray={face.strokeDasharray}
+ strokeDashoffset={face.strokeDashoffset}
+ />
+ <path
+ d={HOUR_PATH}
+ strokeDasharray={hour.strokeDasharray}
+ strokeDashoffset={hour.strokeDashoffset}
+ />
+ <g transform={`rotate(${tick} ${CENTER} ${CENTER})`}>
+ <path
+ d={MINUTE_PATH}
+ strokeDasharray={minute.strokeDasharray}
+ strokeDashoffset={minute.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function ClockIconStatic({
+ 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="10" />
+ <path d={HANDS_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 8121bf7b..d497580e 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2284,6 +2284,21 @@
}
]
},
+ {
+ "name": "icon-clock",
+ "type": "registry:component",
+ "title": "Clock",
+ "description": "Animated Lucide clock icon — the face draws on, then the hands sweep through discrete ticks. Loops by default.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-clock/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-clock.tsx"
+ }
+ ]
+ },
{
"name": "icon-user",
"type": "registry:component",