Bento Grid

Feature cards of different sizes, with an illustration that eases up on hover.

Dependencieslucide-react

Analytics

Every visit, sign-up and sale, in one view.

Learn more

Alerts

Know it as it happens.

Learn more

Integrations

Your tools, connected.

Learn more

Installation#

pnpm dlx shadcn@latest add @balick/bento-grid

Or pass the full URL: https://ui.balick.me/r/bento-grid.json

Usage#

import { BarChart3 } from "lucide-react"

import { BentoCard, BentoGrid } from "@/components/ui/bento-grid"

export function Features() {
  return (
    <BentoGrid>
      <BentoCard
        className="@md/bento:col-span-2"
        icon={<BarChart3 />}
        title="Analytics"
        description="Every visit, sign-up and sale, in one view."
        background={<Chart />}
        href="/analytics"
      />
      <BentoCard title="Alerts" description="Know the moment something happens." />
    </BentoGrid>
  )
}

Props#

<BentoGrid />

PropTypeDefault
className

One column, then two from a 28rem container, three from 48rem. Rows are 16rem high: change them with auto-rows-*.

string—

<BentoCard />

PropTypeDefault
title

Title of the card. Required.

ReactNode—
description

Text under the title.

ReactNode—
icon

Icon shown above the title, in a small tile.

ReactNode—
background

Illustration that fills the card behind the text. It eases up on hover.

ReactNode—
href

Where the card leads. A link slides in under the text on hover, and stays visible on touch screens.

string—
cta

Text of the link.

ReactNode"Learn more"
className

Make a card span two columns with @md/bento:col-span-2.

string—