Skip to content

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

feat: icon bell

dev_wandry387c0e5a361d
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index bde3f475..36c98cd7 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -8,6 +8,7 @@ import { usePrefersReducedMotion } from "@/lib/use-prefers-reduced-motion";
import { cn } from "@/lib/utils";
import registry, { type RegistryEntry } from "@/registry/__index__";
import { AlertTriangleIconStatic } from "@/registry/remocn/icon-alert-triangle";
+import { BellIconStatic } from "@/registry/remocn/icon-bell";
import { CheckCircleIconStatic } from "@/registry/remocn/icon-check-circle";
import { CheckIconStatic } from "@/registry/remocn/icon-check";
import { InfoIconStatic } from "@/registry/remocn/icon-info";
@@ -82,6 +83,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: SearchIconStatic,
},
+ {
+ name: "icon-bell",
+ label: "Bell",
+ category: "Actions & UI",
+ Static: BellIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
@@ -235,11 +242,12 @@ function IconPlayer({ entry }: { entry: RegistryEntry }) {
const pump = () => {
if (cancelled) return;
const player = playerRef.current;
- if (player && !player.isPlaying()) player.play();
- tries += 1;
- if (tries < 120 && (!player || !player.isPlaying())) {
- raf = requestAnimationFrame(pump);
+ if (player) {
+ player.play();
+ if (player.getCurrentFrame() > 0) return;
}
+ tries += 1;
+ if (tries < 120) raf = requestAnimationFrame(pump);
};
raf = requestAnimationFrame(pump);
return () => {
@@ -258,6 +266,7 @@ function IconPlayer({ entry }: { entry: RegistryEntry }) {
compositionHeight={config.compositionHeight}
style={{ width: TILE_SIZE, height: TILE_SIZE }}
loop
+ initiallyMuted
acknowledgeRemotionLicense
/>
);
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 727deec2..56dbd553 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -25,6 +25,7 @@ import { glassCodeBlockConfig } from "@/registry/remocn/glass-code-block/config"
import { glassCodeWalkConfig } from "@/registry/remocn/glass-code-walk/config";
import { grainDissolveConfig } from "@/registry/remocn/grain-dissolve/config";
import { iconAlertTriangleConfig } from "@/registry/remocn/icon-alert-triangle/config";
+import { iconBellConfig } from "@/registry/remocn/icon-bell/config";
import { iconCheckCircleConfig } from "@/registry/remocn/icon-check-circle/config";
import { iconCheckConfig } from "@/registry/remocn/icon-check/config";
import { iconInfoConfig } from "@/registry/remocn/icon-info/config";
@@ -572,6 +573,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconAlertTriangleConfig,
},
+ "icon-bell": {
+ load: () =>
+ import("@/registry/remocn/icon-bell").then((m) => ({
+ default: m.BellIcon,
+ })),
+ config: iconBellConfig,
+ },
"icon-check": {
load: () =>
import("@/registry/remocn/icon-check").then((m) => ({
diff --git a/registry/remocn/icon-bell/config.ts b/registry/remocn/icon-bell/config.ts
new file mode 100644
index 00000000..12e5fdf2
--- /dev/null
+++ b/registry/remocn/icon-bell/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconBellConfig: ComponentConfig = {
+ componentName: "BellIcon",
+ importPath: "@/components/remocn/icon-bell",
+ 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-bell/index.tsx b/registry/remocn/icon-bell/index.tsx
new file mode 100644
index 00000000..861a886a
--- /dev/null
+++ b/registry/remocn/icon-bell/index.tsx
@@ -0,0 +1,120 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const BODY_PATH =
+ "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326";
+const CLAPPER_PATH = "M10.268 21a2 2 0 0 0 3.464 0";
+
+const TIMINGS = {
+ drawDurationInFrames: 14,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 30,
+ loop: false,
+} as const;
+
+export function BellIcon({
+ 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 bodyProgress = interpolate(linearDraw, [0, 0.857], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const clapperProgress = interpolate(linearDraw, [0.714, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const body = drawnPathProps(BODY_PATH, bodyProgress);
+ const clapper = drawnPathProps(CLAPPER_PATH, clapperProgress);
+
+ const ring = interpolate(
+ actionProgress,
+ [0, 0.2, 0.4, 0.6, 0.8, 1],
+ [0, 14, -11, 7, -3, 0],
+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },
+ );
+
+ 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})`,
+ }}
+ >
+ <g transform={`rotate(${ring} 12 2)`}>
+ <path
+ d={BODY_PATH}
+ strokeDasharray={body.strokeDasharray}
+ strokeDashoffset={body.strokeDashoffset}
+ />
+ <path
+ d={CLAPPER_PATH}
+ strokeDasharray={clapper.strokeDasharray}
+ strokeDashoffset={clapper.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function BellIconStatic({
+ 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={BODY_PATH} />
+ <path d={CLAPPER_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index b96feb97..0145513d 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1458,6 +1458,21 @@
"target": "components/remocn/icon-search.tsx"
}
]
+ },
+ {
+ "name": "icon-bell",
+ "type": "registry:component",
+ "title": "Bell",
+ "description": "Animated Lucide bell icon — the body draws on, the clapper follows, then the bell swings from its mount to signal a notification or alert.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-bell/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-bell.tsx"
+ }
+ ]
}
]
}