Skip to content

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

feat: icon target

dev_wandry151e2b66308d
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 3adf9289..2e518880 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -85,6 +85,7 @@ import { SparklesIconStatic } from "@/registry/remocn/icon-sparkles";
import { StarIconStatic } from "@/registry/remocn/icon-star";
import { SunIconStatic } from "@/registry/remocn/icon-sun";
import { TagIconStatic } from "@/registry/remocn/icon-tag";
+import { TargetIconStatic } from "@/registry/remocn/icon-target";
import { TerminalIconStatic } from "@/registry/remocn/icon-terminal";
import { ThumbsUpIconStatic } from "@/registry/remocn/icon-thumbs-up";
import { TimerIconStatic } from "@/registry/remocn/icon-timer";
@@ -338,6 +339,12 @@ export const ICONS: IconEntry[] = [
category: "Charts & data",
Static: BarChart3IconStatic,
},
+ {
+ name: "icon-target",
+ label: "Target",
+ category: "Charts & data",
+ Static: TargetIconStatic,
+ },
{
name: "icon-trending-down",
label: "Trending Down",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index ca08b482..d2fa1b13 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -101,6 +101,7 @@ 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 { iconTagConfig } from "@/registry/remocn/icon-tag/config";
+import { iconTargetConfig } from "@/registry/remocn/icon-target/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";
@@ -1183,6 +1184,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconTagConfig,
},
+ "icon-target": {
+ load: () =>
+ import("@/registry/remocn/icon-target").then((m) => ({
+ default: m.TargetIcon,
+ })),
+ config: iconTargetConfig,
+ },
"icon-terminal": {
load: () =>
import("@/registry/remocn/icon-terminal").then((m) => ({
diff --git a/registry/remocn/icon-target/config.ts b/registry/remocn/icon-target/config.ts
new file mode 100644
index 00000000..bc4850d9
--- /dev/null
+++ b/registry/remocn/icon-target/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconTargetConfig: ComponentConfig = {
+ componentName: "TargetIcon",
+ importPath: "@/components/remocn/icon-target",
+ 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: 80,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-target/index.tsx b/registry/remocn/icon-target/index.tsx
new file mode 100644
index 00000000..0efcd122
--- /dev/null
+++ b/registry/remocn/icon-target/index.tsx
@@ -0,0 +1,148 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const RING_OUTER = "M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z";
+const RING_MID = "M12 6a6 6 0 1 0 0 12 6 6 0 1 0 0-12Z";
+const RING_INNER = "M12 10a2 2 0 1 0 0 4 2 2 0 1 0 0-4Z";
+
+const CENTER = 12;
+
+const TIMINGS = {
+ drawDurationInFrames: 18,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 24,
+ loop: false,
+} as const;
+
+export function TargetIcon({
+ 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 outerDraw = interpolate(linearDraw, [0, 0.55], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const midDraw = interpolate(linearDraw, [0.28, 0.83], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const innerDraw = interpolate(linearDraw, [0.55, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const pop = acting
+ ? interpolate(actionProgress, [0, 0.25, 0.6], [1, 1.5, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+ const shake = acting
+ ? interpolate(
+ actionProgress,
+ [0.6, 0.68, 0.78, 0.88, 1],
+ [0, 0.6, -0.6, 0.3, 0],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ },
+ )
+ : 0;
+
+ const outer = drawnPathProps(RING_OUTER, acting ? 1 : outerDraw);
+ const mid = drawnPathProps(RING_MID, acting ? 1 : midDraw);
+ const inner = drawnPathProps(RING_INNER, acting ? 1 : innerDraw);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const popTransform = `translate(${CENTER * (1 - pop)} ${CENTER * (1 - pop)}) scale(${pop})`;
+
+ 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={`translate(${shake} 0)`}>
+ <path
+ d={RING_OUTER}
+ strokeDasharray={outer.strokeDasharray}
+ strokeDashoffset={outer.strokeDashoffset}
+ />
+ <path
+ d={RING_MID}
+ strokeDasharray={mid.strokeDasharray}
+ strokeDashoffset={mid.strokeDashoffset}
+ />
+ <g transform={popTransform}>
+ <path
+ d={RING_INNER}
+ strokeDasharray={inner.strokeDasharray}
+ strokeDashoffset={inner.strokeDashoffset}
+ />
+ </g>
+ </g>
+ </svg>
+ );
+}
+
+export function TargetIconStatic({
+ 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" />
+ <circle cx="12" cy="12" r="6" />
+ <circle cx="12" cy="12" r="2" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 3e9b71a5..90590292 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2389,6 +2389,21 @@
}
]
},
+ {
+ "name": "icon-target",
+ "type": "registry:component",
+ "title": "Target",
+ "description": "Animated Lucide target icon — three rings draw in from outside, then the bullseye hits: inner dot pops and the board shudders.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-target/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-target.tsx"
+ }
+ ]
+ },
{
"name": "icon-terminal",
"type": "registry:component",