Skip to content

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

feat: icon layout grid

dev_wandrya53e86ab31ab
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 5893d7a8..d0768fda 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -28,6 +28,7 @@ import { FlameIconStatic } from "@/registry/remocn/icon-flame";
import { HeartIconStatic } from "@/registry/remocn/icon-heart";
import { ImageIconStatic } from "@/registry/remocn/icon-image";
import { InfoIconStatic } from "@/registry/remocn/icon-info";
+import { LayoutGridIconStatic } from "@/registry/remocn/icon-layout-grid";
import { LoaderIconStatic } from "@/registry/remocn/icon-loader";
import { MaximizeIconStatic } from "@/registry/remocn/icon-maximize";
import { MenuIconStatic } from "@/registry/remocn/icon-menu";
@@ -192,6 +193,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: MaximizeIconStatic,
},
+ {
+ name: "icon-layout-grid",
+ label: "Layout Grid",
+ category: "Actions & UI",
+ Static: LayoutGridIconStatic,
+ },
{
name: "icon-play",
label: "Play",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index ef7bdb80..2f95c491 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -44,6 +44,7 @@ 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 { iconInfoConfig } from "@/registry/remocn/icon-info/config";
+import { iconLayoutGridConfig } from "@/registry/remocn/icon-layout-grid/config";
import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";
import { iconMaximizeConfig } from "@/registry/remocn/icon-maximize/config";
import { iconMenuConfig } from "@/registry/remocn/icon-menu/config";
@@ -734,6 +735,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconInfoConfig,
},
+ "icon-layout-grid": {
+ load: () =>
+ import("@/registry/remocn/icon-layout-grid").then((m) => ({
+ default: m.LayoutGridIcon,
+ })),
+ config: iconLayoutGridConfig,
+ },
"icon-loader": {
load: () =>
import("@/registry/remocn/icon-loader").then((m) => ({
diff --git a/registry/remocn/icon-layout-grid/config.ts b/registry/remocn/icon-layout-grid/config.ts
new file mode 100644
index 00000000..d8ced674
--- /dev/null
+++ b/registry/remocn/icon-layout-grid/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconLayoutGridConfig: ComponentConfig = {
+ componentName: "LayoutGridIcon",
+ importPath: "@/components/remocn/icon-layout-grid",
+ 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-layout-grid/index.tsx b/registry/remocn/icon-layout-grid/index.tsx
new file mode 100644
index 00000000..868dbed2
--- /dev/null
+++ b/registry/remocn/icon-layout-grid/index.tsx
@@ -0,0 +1,132 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const TL_PATH =
+ "M4 3H9A1 1 0 0 1 10 4V9A1 1 0 0 1 9 10H4A1 1 0 0 1 3 9V4A1 1 0 0 1 4 3Z";
+const TR_PATH =
+ "M15 3H20A1 1 0 0 1 21 4V9A1 1 0 0 1 20 10H15A1 1 0 0 1 14 9V4A1 1 0 0 1 15 3Z";
+const BR_PATH =
+ "M15 14H20A1 1 0 0 1 21 15V20A1 1 0 0 1 20 21H15A1 1 0 0 1 14 20V15A1 1 0 0 1 15 14Z";
+const BL_PATH =
+ "M4 14H9A1 1 0 0 1 10 15V20A1 1 0 0 1 9 21H4A1 1 0 0 1 3 20V15A1 1 0 0 1 4 14Z";
+
+const TIMINGS = {
+ drawDurationInFrames: 20,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 26,
+ loop: false,
+} as const;
+
+const TILES = [
+ { path: TL_PATH, cx: 6.5, cy: 6.5, drawWindow: [0, 0.4], stagger: 0 },
+ { path: TR_PATH, cx: 17.5, cy: 6.5, drawWindow: [0.2, 0.6], stagger: 0.23 },
+ { path: BR_PATH, cx: 17.5, cy: 17.5, drawWindow: [0.4, 0.8], stagger: 0.46 },
+ { path: BL_PATH, cx: 6.5, cy: 17.5, drawWindow: [0.6, 1], stagger: 0.69 },
+] as const;
+
+export function LayoutGridIcon({
+ 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 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})`,
+ }}
+ >
+ {TILES.map((tile) => {
+ const drawn = interpolate(linearDraw, [...tile.drawWindow], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const dash = drawnPathProps(tile.path, drawn);
+ const pop =
+ acting && actionProgress >= tile.stagger
+ ? interpolate(
+ actionProgress,
+ [tile.stagger, tile.stagger + 0.25, tile.stagger + 0.5],
+ [0.85, 1.06, 1],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ },
+ )
+ : 1;
+ const tx = tile.cx * (1 - pop);
+ const ty = tile.cy * (1 - pop);
+ return (
+ <g key={tile.path} transform={`translate(${tx} ${ty}) scale(${pop})`}>
+ <path
+ d={tile.path}
+ strokeDasharray={dash.strokeDasharray}
+ strokeDashoffset={dash.strokeDashoffset}
+ />
+ </g>
+ );
+ })}
+ </svg>
+ );
+}
+
+export function LayoutGridIconStatic({
+ 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"
+ >
+ <rect width="7" height="7" x="3" y="3" rx="1" />
+ <rect width="7" height="7" x="14" y="3" rx="1" />
+ <rect width="7" height="7" x="14" y="14" rx="1" />
+ <rect width="7" height="7" x="3" y="14" rx="1" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index f4d5c014..8601cda8 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1954,6 +1954,21 @@
}
]
},
+ {
+ "name": "icon-layout-grid",
+ "type": "registry:component",
+ "title": "Layout Grid",
+ "description": "Animated Lucide layout-grid icon — four tiles draw on, then re-pop into place clockwise like a dashboard assembling.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-layout-grid/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-layout-grid.tsx"
+ }
+ ]
+ },
{
"name": "icon-sparkles",
"type": "registry:component",