Skip to content

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

feat: icon heart

dev_wandry7443b6b8d34f
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 6ca0eafe..68211e0f 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -13,6 +13,7 @@ import { CheckCircleIconStatic } from "@/registry/remocn/icon-check-circle";
import { CheckIconStatic } from "@/registry/remocn/icon-check";
import { CopyIconStatic } from "@/registry/remocn/icon-copy";
import { DownloadIconStatic } from "@/registry/remocn/icon-download";
+import { HeartIconStatic } from "@/registry/remocn/icon-heart";
import { InfoIconStatic } from "@/registry/remocn/icon-info";
import { LoaderIconStatic } from "@/registry/remocn/icon-loader";
import { PlusIconStatic } from "@/registry/remocn/icon-plus";
@@ -138,6 +139,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: SendIconStatic,
},
+ {
+ name: "icon-heart",
+ label: "Heart",
+ category: "Emotion & accents",
+ Static: HeartIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 3820c40a..e1e766d3 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -30,6 +30,7 @@ import { iconCheckCircleConfig } from "@/registry/remocn/icon-check-circle/confi
import { iconCheckConfig } from "@/registry/remocn/icon-check/config";
import { iconCopyConfig } from "@/registry/remocn/icon-copy/config";
import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";
+import { iconHeartConfig } from "@/registry/remocn/icon-heart/config";
import { iconInfoConfig } from "@/registry/remocn/icon-info/config";
import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";
import { iconPlusConfig } from "@/registry/remocn/icon-plus/config";
@@ -608,6 +609,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconDownloadConfig,
},
+ "icon-heart": {
+ load: () =>
+ import("@/registry/remocn/icon-heart").then((m) => ({
+ default: m.HeartIcon,
+ })),
+ config: iconHeartConfig,
+ },
"icon-info": {
load: () =>
import("@/registry/remocn/icon-info").then((m) => ({
diff --git a/registry/remocn/icon-heart/config.ts b/registry/remocn/icon-heart/config.ts
new file mode 100644
index 00000000..955803c9
--- /dev/null
+++ b/registry/remocn/icon-heart/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconHeartConfig: ComponentConfig = {
+ componentName: "HeartIcon",
+ importPath: "@/components/remocn/icon-heart",
+ 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: 75,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-heart/index.tsx b/registry/remocn/icon-heart/index.tsx
new file mode 100644
index 00000000..187a59de
--- /dev/null
+++ b/registry/remocn/icon-heart/index.tsx
@@ -0,0 +1,109 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const HEART_PATH =
+ "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5";
+
+const TIMINGS = {
+ drawDurationInFrames: 14,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 26,
+ loop: false,
+} as const;
+
+export function HeartIcon({
+ animation = "both",
+ loop,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionProgress } = useIconAnimation(
+ { animation, loop, speed },
+ TIMINGS,
+ );
+
+ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);
+
+ const heartProgress = interpolate(linearDraw, [0, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+
+ const heart = drawnPathProps(HEART_PATH, heartProgress);
+
+ const beat = interpolate(
+ actionProgress,
+ [0, 0.2, 0.4, 0.6, 0.8, 1],
+ [1, 1.16, 1, 1.1, 1, 1],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ },
+ );
+
+ const scale = (0.85 + 0.15 * scaleIn) * beat;
+
+ 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={HEART_PATH}
+ strokeDasharray={heart.strokeDasharray}
+ strokeDashoffset={heart.strokeDashoffset}
+ />
+ </svg>
+ );
+}
+
+export function HeartIconStatic({
+ 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={HEART_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 6419df12..b3c9fca6 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1578,6 +1578,21 @@
"target": "components/remocn/icon-send.tsx"
}
]
+ },
+ {
+ "name": "icon-heart",
+ "type": "registry:component",
+ "title": "Heart",
+ "description": "Animated Lucide heart icon — the outline draws on, then a lub-dub heartbeat pulse for likes, favorites, or built-with-love moments.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-heart/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-heart.tsx"
+ }
+ ]
}
]
}