blockmotion
Bento grid (motion)
The bento grid, with tiles appearing one after another.
Open in v0 (opens in a new tab)
This is the animated version of Bento grid. The static version looks the same with JavaScript turned off.
Preview
Installation
pnpm dlx shadcn@latest add https://facadeui.dev/r/bento-grid-motion.jsonThis component needs bento-grid, motion-primitives. The CLI installs them for you.
Usage
This is the code for the preview above. To install it as a file, run npx shadcn@latest add @facade/bento-grid-motion-demo.
"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
These are the files the CLI copies into your project.
"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">.