Skip to content

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

feat: inbox

dev_wandryb07f6d512e85
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 63a988e3..78c7b2b5 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -32,6 +32,7 @@ import { FilterIconStatic } from "@/registry/remocn/icon-filter";
import { FlameIconStatic } from "@/registry/remocn/icon-flame";
import { HeartIconStatic } from "@/registry/remocn/icon-heart";
import { ImageIconStatic } from "@/registry/remocn/icon-image";
+import { InboxIconStatic } from "@/registry/remocn/icon-inbox";
import { InfoIconStatic } from "@/registry/remocn/icon-info";
import { KeyIconStatic } from "@/registry/remocn/icon-key";
import { LayoutGridIconStatic } from "@/registry/remocn/icon-layout-grid";
@@ -379,6 +380,12 @@ export const ICONS: IconEntry[] = [
category: "People & communication",
Static: AtSignIconStatic,
},
+ {
+ name: "icon-inbox",
+ label: "Inbox",
+ category: "People & communication",
+ Static: InboxIconStatic,
+ },
{
name: "icon-heart",
label: "Heart",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 662085a2..a484b7c1 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -48,6 +48,7 @@ import { iconFilterConfig } from "@/registry/remocn/icon-filter/config";
import { iconFlameConfig } from "@/registry/remocn/icon-flame/config";
import { iconHeartConfig } from "@/registry/remocn/icon-heart/config";
import { iconImageConfig } from "@/registry/remocn/icon-image/config";
+import { iconInboxConfig } from "@/registry/remocn/icon-inbox/config";
import { iconInfoConfig } from "@/registry/remocn/icon-info/config";
import { iconKeyConfig } from "@/registry/remocn/icon-key/config";
import { iconLayoutGridConfig } from "@/registry/remocn/icon-layout-grid/config";
@@ -781,6 +782,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconImageConfig,
},
+ "icon-inbox": {
+ load: () =>
+ import("@/registry/remocn/icon-inbox").then((m) => ({
+ default: m.InboxIcon,
+ })),
+ config: iconInboxConfig,
+ },
"icon-info": {
load: () =>
import("@/registry/remocn/icon-info").then((m) => ({
diff --git a/registry/remocn/icon-inbox/config.ts b/registry/remocn/icon-inbox/config.ts
new file mode 100644
index 00000000..eab22d29
--- /dev/null
+++ b/registry/remocn/icon-inbox/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconInboxConfig: ComponentConfig = {
+ componentName: "InboxIcon",
+ importPath: "@/components/remocn/icon-inbox",
+ 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-inbox/index.tsx b/registry/remocn/icon-inbox/index.tsx
new file mode 100644
index 00000000..4a1d59b4
--- /dev/null
+++ b/registry/remocn/icon-inbox/index.tsx
@@ -0,0 +1,125 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const TRAY_PATH =
+ "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z";
+const LIP_PATH = "M22 12H16L14 15H10L8 12H2";
+
+const TIMINGS = {
+ drawDurationInFrames: 16,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 22,
+ loop: false,
+} as const;
+
+export function InboxIcon({
+ 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 trayDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const lipDraw = interpolate(linearDraw, [0.45, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const dip = acting
+ ? interpolate(actionProgress, [0, 0.25, 0.55, 1], [0, 0, 2, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 0;
+ const pop = acting
+ ? interpolate(actionProgress, [0.55, 0.75, 1], [1, 1.03, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+
+ const tray = drawnPathProps(TRAY_PATH, acting ? 1 : trayDraw);
+ const lip = drawnPathProps(LIP_PATH, acting ? 1 : lipDraw);
+
+ const scale = (0.85 + 0.15 * scaleIn) * 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: `translateY(${dip}px) scale(${scale})`,
+ }}
+ >
+ <path
+ d={TRAY_PATH}
+ strokeDasharray={tray.strokeDasharray}
+ strokeDashoffset={tray.strokeDashoffset}
+ />
+ <path
+ d={LIP_PATH}
+ strokeDasharray={lip.strokeDasharray}
+ strokeDashoffset={lip.strokeDashoffset}
+ />
+ </svg>
+ );
+}
+
+export function InboxIconStatic({
+ 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"
+ >
+ <polyline points="22 12 16 12 14 15 10 15 8 12 2 12" />
+ <path d={TRAY_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 8bdeaba4..cc3ec0de 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2194,6 +2194,21 @@
}
]
},
+ {
+ "name": "icon-inbox",
+ "type": "registry:component",
+ "title": "Inbox",
+ "description": "Animated Lucide inbox icon — the tray draws on, then dips under the weight of an arriving item and springs back.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-inbox/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-inbox.tsx"
+ }
+ ]
+ },
{
"name": "icon-user",
"type": "registry:component",