Skip to content
Facade UI
Colour mode
GitHub (opens in a new tab)
blockmotion

Bento grid (motion)

Bento mosaic with a staggered entrance.

Wraps the static Bento grid, which renders identically with JavaScript disabled.

Preview

Open full width (opens in a new tab)
Preview width

Installation

Package manager
pnpm dlx shadcn@latest add https://facadeui.dev/r/bento-grid-motion.json

Pulls in bento-grid, motion-primitives. The CLI installs them for you.

Usage

The exact source of the preview above.

demos/bento-grid-motion.tsx
"use client"

/**
 * The `bento-grid` demo, with the motion variant swapped in.
 *
 * Identical props: the motion variant only changes which slot components
 * the static section renders through.
 *
 * `"use client"` is required here, not incidental: the motion variant is a
 * client component, and icon components cannot cross a server-to-client
 * boundary as props. See the note on `IconComponent`.
 */

import { BentoGridMotion } from "@registry/sections/bento-grid-motion"

import { BENTO } from "./content"

export function Demo() {
  return (
    <BentoGridMotion
      eyebrow="At a glance"
      title="A mosaic that still reads in order"
      description="Tiles are laid out in the order they are given — no dense packing, so reading order matches what you see."
      items={BENTO}
    />
  )
}

Source

What the CLI copies into your project, byte for byte.

components/sections/bento-grid-motion.tsx
"use client"

/**
 * BentoGridMotion — the bento mosaic with a staggered entrance.
 *
 * Dependencies: react, @/components/motion/slots, @/components/sections/bento-grid.
 */

import { StaggerList, StaggerListItem } from "@/components/motion/slots"
import { BentoGrid, type BentoGridProps } from "@/components/sections/bento-grid"

export type BentoGridMotionProps = Omit<BentoGridProps, "listAs" | "itemAs">

export function BentoGridMotion(props: BentoGridMotionProps) {
  return <BentoGrid {...props} listAs={StaggerList} itemAs={StaggerListItem} />
}

Props

BentoGridMotionProps

Extends Omit<BentoGridProps, "listAs" | "itemAs">.