Skip to content

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

feat: icon tag

dev_wandry6f11850c4edd
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 615a7f5b..1e0c1512 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -80,6 +80,7 @@ import { SmartphoneIconStatic } from "@/registry/remocn/icon-smartphone";
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 { TerminalIconStatic } from "@/registry/remocn/icon-terminal";
import { ThumbsUpIconStatic } from "@/registry/remocn/icon-thumbs-up";
import { TimerIconStatic } from "@/registry/remocn/icon-timer";
@@ -294,6 +295,12 @@ export const ICONS: IconEntry[] = [
category: "Commerce",
Static: DollarSignIconStatic,
},
+ {
+ name: "icon-tag",
+ label: "Tag",
+ category: "Commerce",
+ Static: TagIconStatic,
+ },
{
name: "icon-search",
label: "Search",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 9b9cce43..fe8bd1c8 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -96,6 +96,7 @@ import { iconSmartphoneConfig } from "@/registry/remocn/icon-smartphone/config";
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 { iconTerminalConfig } from "@/registry/remocn/icon-terminal/config";
import { iconThumbsUpConfig } from "@/registry/remocn/icon-thumbs-up/config";
import { iconTimerConfig } from "@/registry/remocn/icon-timer/config";
@@ -1140,6 +1141,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconSunConfig,
},
+ "icon-tag": {
+ load: () =>
+ import("@/registry/remocn/icon-tag").then((m) => ({
+ default: m.TagIcon,
+ })),
+ config: iconTagConfig,
+ },
"icon-terminal": {
load: () =>
import("@/registry/remocn/icon-terminal").then((m) => ({
diff --git a/registry/remocn/icon-tag/config.ts b/registry/remocn/icon-tag/config.ts
new file mode 100644
index 00000000..138d537c
--- /dev/null
+++ b/registry/remocn/icon-tag/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconTagConfig: ComponentConfig = {
+ componentName: "TagIcon",
+ importPath: "@/components/remocn/icon-tag",
+ 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-tag/index.tsx b/registry/remocn/icon-tag/index.tsx
new file mode 100644
index 00000000..6975fa48
--- /dev/null
+++ b/registry/remocn/icon-tag/index.tsx
@@ -0,0 +1,122 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const TAG_PATH =
+ "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z";
+
+const HOLE_X = 7.5;
+const HOLE_Y = 7.5;
+
+const TIMINGS = {
+ drawDurationInFrames: 16,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 26,
+ loop: false,
+} as const;
+
+export function TagIcon({
+ 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 holeScale = acting
+ ? 1
+ : interpolate(linearDraw, [0.7, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const swing = acting
+ ? interpolate(
+ actionProgress,
+ [0, 0.2, 0.45, 0.7, 1],
+ [0, 8, -6, 3, 0],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.sin),
+ },
+ )
+ : 0;
+
+ const tag = drawnPathProps(TAG_PATH, drawProgress);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const holeTransform = `translate(${HOLE_X * (1 - holeScale)} ${HOLE_Y * (1 - holeScale)}) scale(${holeScale})`;
+
+ 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(${swing} ${HOLE_X} ${HOLE_Y})`}>
+ <path
+ d={TAG_PATH}
+ strokeDasharray={tag.strokeDasharray}
+ strokeDashoffset={tag.strokeDashoffset}
+ />
+ <g transform={holeTransform}>
+ <circle cx="7.5" cy="7.5" r="0.5" fill={color} stroke="none" />
+ </g>
+ </g>
+ </svg>
+ );
+}
+
+export function TagIconStatic({
+ 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={TAG_PATH} />
+ <circle cx="7.5" cy="7.5" r="0.5" fill={color} stroke="none" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index c5414ffd..f2a79bb6 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2539,6 +2539,21 @@
}
]
},
+ {
+ "name": "icon-tag",
+ "type": "registry:component",
+ "title": "Tag",
+ "description": "Animated Lucide tag icon — draws on, then swings from its hole like a price tag flicked by a shopper.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-tag/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-tag.tsx"
+ }
+ ]
+ },
{
"name": "icon-user",
"type": "registry:component",