Skip to content

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

feat: icon timer

dev_wandryfddc06718f64
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index e17040ee..197cb1b6 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -67,6 +67,7 @@ import { SkipForwardIconStatic } from "@/registry/remocn/icon-skip-forward";
import { SparklesIconStatic } from "@/registry/remocn/icon-sparkles";
import { StarIconStatic } from "@/registry/remocn/icon-star";
import { ThumbsUpIconStatic } from "@/registry/remocn/icon-thumbs-up";
+import { TimerIconStatic } from "@/registry/remocn/icon-timer";
import { ZapIconStatic } from "@/registry/remocn/icon-zap";
import { TrashIconStatic } from "@/registry/remocn/icon-trash";
import { UploadIconStatic } from "@/registry/remocn/icon-upload";
@@ -182,6 +183,12 @@ export const ICONS: IconEntry[] = [
category: "Time & planning",
Static: ClockIconStatic,
},
+ {
+ name: "icon-timer",
+ label: "Timer",
+ category: "Time & planning",
+ Static: TimerIconStatic,
+ },
{
name: "icon-search",
label: "Search",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index ceb6e06f..fcf7e5e6 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -83,6 +83,7 @@ import { iconSkipForwardConfig } from "@/registry/remocn/icon-skip-forward/confi
import { iconSparklesConfig } from "@/registry/remocn/icon-sparkles/config";
import { iconStarConfig } from "@/registry/remocn/icon-star/config";
import { iconThumbsUpConfig } from "@/registry/remocn/icon-thumbs-up/config";
+import { iconTimerConfig } from "@/registry/remocn/icon-timer/config";
import { iconTrashConfig } from "@/registry/remocn/icon-trash/config";
import { iconUploadConfig } from "@/registry/remocn/icon-upload/config";
import { iconUserPlusConfig } from "@/registry/remocn/icon-user-plus/config";
@@ -1033,6 +1034,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconThumbsUpConfig,
},
+ "icon-timer": {
+ load: () =>
+ import("@/registry/remocn/icon-timer").then((m) => ({
+ default: m.TimerIcon,
+ })),
+ config: iconTimerConfig,
+ },
"icon-trash": {
load: () =>
import("@/registry/remocn/icon-trash").then((m) => ({
diff --git a/registry/remocn/icon-timer/config.ts b/registry/remocn/icon-timer/config.ts
new file mode 100644
index 00000000..e6f77ba4
--- /dev/null
+++ b/registry/remocn/icon-timer/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconTimerConfig: ComponentConfig = {
+ componentName: "TimerIcon",
+ importPath: "@/components/remocn/icon-timer",
+ 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: 90,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-timer/index.tsx b/registry/remocn/icon-timer/index.tsx
new file mode 100644
index 00000000..121655c8
--- /dev/null
+++ b/registry/remocn/icon-timer/index.tsx
@@ -0,0 +1,144 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const DIAL_PATH = "M12 6a8 8 0 1 0 0 16 8 8 0 1 0 0-16Z";
+const BUTTON_PATH = "M10 2H14";
+const HAND_PATH = "M12 14 15 11";
+
+const DIAL_CX = 12;
+const DIAL_CY = 14;
+
+const TIMINGS = {
+ drawDurationInFrames: 18,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 48,
+ loop: false,
+} as const;
+
+export function TimerIcon({
+ 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 dialDraw = interpolate(linearDraw, [0, 0.6], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const buttonDraw = interpolate(linearDraw, [0.45, 0.75], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const handDraw = interpolate(linearDraw, [0.7, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const buttonDip = acting
+ ? interpolate(actionProgress, [0, 0.15, 0.3], [0, 1.5, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 0;
+ const handSweep = acting
+ ? interpolate(actionProgress, [0.3, 1], [0, 360], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.cubic),
+ })
+ : 0;
+
+ const dial = drawnPathProps(DIAL_PATH, acting ? 1 : dialDraw);
+ const button = drawnPathProps(BUTTON_PATH, acting ? 1 : buttonDraw);
+ const hand = drawnPathProps(HAND_PATH, acting ? 1 : handDraw);
+
+ 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={DIAL_PATH}
+ strokeDasharray={dial.strokeDasharray}
+ strokeDashoffset={dial.strokeDashoffset}
+ />
+ <g transform={`translate(0 ${buttonDip})`}>
+ <path
+ d={BUTTON_PATH}
+ strokeDasharray={button.strokeDasharray}
+ strokeDashoffset={button.strokeDashoffset}
+ />
+ </g>
+ <g transform={`rotate(${handSweep} ${DIAL_CX} ${DIAL_CY})`}>
+ <path
+ d={HAND_PATH}
+ strokeDasharray={hand.strokeDasharray}
+ strokeDashoffset={hand.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function TimerIconStatic({
+ 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"
+ >
+ <line x1="10" x2="14" y1="2" y2="2" />
+ <line x1="12" x2="15" y1="14" y2="11" />
+ <circle cx="12" cy="14" r="8" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index d497580e..0b536ebd 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2299,6 +2299,21 @@
}
]
},
+ {
+ "name": "icon-timer",
+ "type": "registry:component",
+ "title": "Timer",
+ "description": "Animated Lucide timer icon — draws on, then the start button clicks and the hand sweeps: the stopwatch is running.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-timer/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-timer.tsx"
+ }
+ ]
+ },
{
"name": "icon-user",
"type": "registry:component",