Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Bento Grid, animated React component

A free React bento grid in Tailwind CSS: tiles of different sizes where one soft light follows the pointer across all of them, so the grid reads as a single surface. Tiles rise in one after another when scrolled into view, lift on hover, and take any React node as their visual. Light or dark.

  • Free
  • Bento Grids
  • Hover
  • Spring
  • Scroll

Like Bento Grid? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Bento Grid stays free.

Set it up, copy the code

Choose values for the main props and the JSX on the right updates to match.

Light or dark tiles.

A ghost light drifts across the tiles until the visitor touches the grid. Never runs under reduced motion.

Your JSX

<BentoGrid
  tone="light"
  autoplay={false}
/>

Props

PropTypeDefaultWhat it does
itemsdemo tilesThe tiles: { id?, title, description, visual?, cols?, rows?, href? }. cols is 1 to 3 and rows is 1 or 2.
tone"light"Light or dark tiles.
autoplayfalseA ghost light drifts across the tiles until the visitor touches the grid. Never runs under reduced motion.
className""Extra classes for the grid.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/bento-grid
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    bento-grid/
    bento-grid.tsx
    index.ts
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { BentoGrid } from "@/components/bento-grid";
    
    export default function Page() {
      return (
        <main>
          <BentoGrid />
        </main>
      );
    }

Like Bento Grid? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Bento Grid stays free.

Bento Grid questions

How do I install the bento grid?

Run `npx shadcn@latest add @nexus-labs/bento-grid`. It adds the component and installs framer-motion.

How do I make tiles different sizes?

Give each item `cols` (1 to 3) and `rows` (1 or 2). The grid has three columns from tablet width up, two on small screens and one on phones.

What can I put in a tile?

Anything. Pass a React node as `visual`: a chart, a form, an image, a video or your own component. The title and description sit under it.

How do I make a tile a link?

Add `href` to the item. A link covers the whole tile and uses the title as its accessible name.

Does it work in dark mode?

Set `tone="dark"` for dark tiles. Both tones use fixed colours, so they look the same whatever the page theme is.

Guides