Skip to content

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

feat: icon box

dev_wandry252695aaab24
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 1e0c1512..90344e7e 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -60,6 +60,7 @@ import { MicIconStatic } from "@/registry/remocn/icon-mic";
import { MonitorIconStatic } from "@/registry/remocn/icon-monitor";
import { MoonIconStatic } from "@/registry/remocn/icon-moon";
import { MoreHorizontalIconStatic } from "@/registry/remocn/icon-more-horizontal";
+import { PackageIconStatic } from "@/registry/remocn/icon-package";
import { PartyPopperIconStatic } from "@/registry/remocn/icon-party-popper";
import { PauseIconStatic } from "@/registry/remocn/icon-pause";
import { PencilIconStatic } from "@/registry/remocn/icon-pencil";
@@ -301,6 +302,12 @@ export const ICONS: IconEntry[] = [
category: "Commerce",
Static: TagIconStatic,
},
+ {
+ name: "icon-package",
+ label: "Package",
+ category: "Commerce",
+ Static: PackageIconStatic,
+ },
{
name: "icon-search",
label: "Search",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index fe8bd1c8..2017ef57 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -76,6 +76,7 @@ import { iconMicConfig } from "@/registry/remocn/icon-mic/config";
import { iconMonitorConfig } from "@/registry/remocn/icon-monitor/config";
import { iconMoonConfig } from "@/registry/remocn/icon-moon/config";
import { iconMoreHorizontalConfig } from "@/registry/remocn/icon-more-horizontal/config";
+import { iconPackageConfig } from "@/registry/remocn/icon-package/config";
import { iconPartyPopperConfig } from "@/registry/remocn/icon-party-popper/config";
import { iconPauseConfig } from "@/registry/remocn/icon-pause/config";
import { iconPencilConfig } from "@/registry/remocn/icon-pencil/config";
@@ -1001,6 +1002,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconMoreHorizontalConfig,
},
+ "icon-package": {
+ load: () =>
+ import("@/registry/remocn/icon-package").then((m) => ({
+ default: m.PackageIcon,
+ })),
+ config: iconPackageConfig,
+ },
"icon-party-popper": {
load: () =>
import("@/registry/remocn/icon-party-popper").then((m) => ({
diff --git a/registry/remocn/icon-package/config.ts b/registry/remocn/icon-package/config.ts
new file mode 100644
index 00000000..3ea2bd09
--- /dev/null
+++ b/registry/remocn/icon-package/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconPackageConfig: ComponentConfig = {
+ componentName: "PackageIcon",
+ importPath: "@/components/remocn/icon-package",
+ 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-package/index.tsx b/registry/remocn/icon-package/index.tsx
new file mode 100644
index 00000000..444ab15a
--- /dev/null
+++ b/registry/remocn/icon-package/index.tsx
@@ -0,0 +1,150 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const BOX_PATH =
+ "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z";
+const CENTER_PATH = "M12 22V12";
+const EDGE_PATH = "M7.5 4.27 16.5 9.42";
+const SEAM_PATH = "M3.29 7 12 12 20.71 7";
+
+const BASE_Y = 22;
+
+const TIMINGS = {
+ drawDurationInFrames: 16,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 26,
+ loop: false,
+} as const;
+
+export function PackageIcon({
+ 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 boxDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const edgesDraw = interpolate(linearDraw, [0.45, 0.8], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const seamDraw = interpolate(linearDraw, [0.7, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const drop = acting
+ ? interpolate(actionProgress, [0, 0.25, 0.5], [0, 2, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 0;
+ const squashY = acting
+ ? interpolate(actionProgress, [0, 0.25, 0.5, 0.7, 1], [1, 0.95, 1.04, 1, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+ const box = drawnPathProps(BOX_PATH, acting ? 1 : boxDraw);
+ const center = drawnPathProps(CENTER_PATH, acting ? 1 : edgesDraw);
+ const edge = drawnPathProps(EDGE_PATH, acting ? 1 : edgesDraw);
+ const seam = drawnPathProps(SEAM_PATH, acting ? 1 : seamDraw);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const bodyTransform = `translate(0 ${drop + BASE_Y * (1 - squashY)}) scale(1 ${squashY})`;
+
+ 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={bodyTransform}>
+ <path
+ d={BOX_PATH}
+ strokeDasharray={box.strokeDasharray}
+ strokeDashoffset={box.strokeDashoffset}
+ />
+ <path
+ d={CENTER_PATH}
+ strokeDasharray={center.strokeDasharray}
+ strokeDashoffset={center.strokeDashoffset}
+ />
+ <path
+ d={EDGE_PATH}
+ strokeDasharray={edge.strokeDasharray}
+ strokeDashoffset={edge.strokeDashoffset}
+ />
+ <path
+ d={SEAM_PATH}
+ strokeDasharray={seam.strokeDasharray}
+ strokeDashoffset={seam.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function PackageIconStatic({
+ 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={BOX_PATH} />
+ <path d={CENTER_PATH} />
+ <polyline points="3.29 7 12 12 20.71 7" />
+ <path d="m7.5 4.27 9 5.15" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index f2a79bb6..658bca64 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2554,6 +2554,21 @@
}
]
},
+ {
+ "name": "icon-package",
+ "type": "registry:component",
+ "title": "Package",
+ "description": "Animated Lucide package icon — the box draws on, lands with a squash-and-stretch, then the tape seam seals it.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-package/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-package.tsx"
+ }
+ ]
+ },
{
"name": "icon-user",
"type": "registry:component",