Skip to content

Bento Grid 1

Bento grid of product capabilities with chart, metric, key and integration tiles.

01 / 01

Installation

Run this in a project that already uses shadcn/ui. The CLI adds the block, its components and npm dependencies.

pnpm dlx shadcn@latest add https://ui.sumansharma.info.np/r/bento-grid-1.json
Prefer to iterate with AI?Open in

Usage

The CLI writes the block to components/bento-grid-1.tsx. Import it anywhere:

Loading...

Source

The CLI writes this component to components/bento-grid-1.tsx.

import { Activity, Globe2, KeyRound, Layers, Sparkles, Zap } from 'lucide-react'
import { cn } from '@/lib/utils'

function Tile({ className, children }: { className?: string; children: React.ReactNode }) {
    return <div className={cn('bg-card group relative isolate overflow-hidden rounded-2xl border p-6 transition-shadow hover:shadow-lg hover:shadow-black/5', className)}>{children}</div>
}

function TileText({ icon: Icon, title, body }: { icon: React.ElementType; title: string; body: string }) {
    return (
        <div className="relative z-10">
            <Icon className="text-muted-foreground size-5" />
            <h3 className="mt-4 font-semibold">{title}</h3>
            <p className="text-muted-foreground mt-1.5 max-w-xs text-sm">{body}</p>
        </div>
    )
}

const bars = [38, 52, 44, 70, 58, 82, 64, 90, 76, 96]

export default function BentoGrid() {
    return (
        <section className="py-16 md:py-24">
            <div className="mx-auto max-w-6xl px-6">
                <div className="mx-auto max-w-2xl text-center">
                    <h2 className="text-balance text-4xl font-semibold lg:text-5xl">Everything in one place</h2>
                    <p className="text-muted-foreground mt-4">The tools your team reaches for every day, designed to work together from the first click.</p>
                </div>

                <div className="mt-14 grid auto-rows-[minmax(14rem,auto)] gap-4 md:grid-cols-6">
                    {/* Analytics: wide tile with a bar chart */}
                    <Tile className="md:col-span-4">
                        <TileText
                            icon={Activity}
                            title="Real-time analytics"
                            body="Watch traffic, conversions and errors update the moment they happen."
                        />
                        <div
                            aria-hidden
                            className="absolute inset-x-6 bottom-0 flex h-28 items-end gap-2">
                            {bars.map((h, i) => (
                                <span
                                    key={i}
                                    style={{ height: `${h}%` }}
                                    className="bg-foreground/10 group-hover:bg-foreground/20 flex-1 rounded-t-md transition-colors duration-300 last:bg-foreground/80"
                                />
                            ))}
                        </div>
                    </Tile>

                    {/* Speed: big number */}
                    <Tile className="flex flex-col justify-between md:col-span-2">
                        <TileText
                            icon={Zap}
                            title="Fast by default"
                            body="Edge-cached on every request."
                        />
                        <p className="relative z-10 text-5xl font-semibold tracking-tight">
                            42<span className="text-muted-foreground text-2xl">ms</span>
                        </p>
                    </Tile>

                    {/* Global: dotted globe */}
                    <Tile className="md:col-span-2">
                        <TileText
                            icon={Globe2}
                            title="Global regions"
                            body="Deploy close to your users in 30+ regions."
                        />
                        <div
                            aria-hidden
                            className="absolute -bottom-24 -right-16 size-64 rounded-full border bg-[radial-gradient(var(--color-border)_1.5px,transparent_1.5px)] [background-size:12px_12px] transition-transform duration-700 group-hover:rotate-12"
                        />
                    </Tile>

                    {/* Security: key list */}
                    <Tile className="md:col-span-2">
                        <TileText
                            icon={KeyRound}
                            title="Secure access"
                            body="SSO, SCIM and fine-grained API keys."
                        />
                        <ul
                            aria-hidden
                            className="relative z-10 mt-5 space-y-2 font-mono text-xs">
                            {['sk_live_••••4f2a', 'sk_test_••••91bc'].map((k) => (
                                <li
                                    key={k}
                                    className="bg-muted/60 flex items-center justify-between rounded-md border px-3 py-2">
                                    {k}
                                    <span className="size-1.5 rounded-full bg-emerald-500" />
                                </li>
                            ))}
                        </ul>
                    </Tile>

                    {/* AI */}
                    <Tile className="md:col-span-2">
                        <TileText
                            icon={Sparkles}
                            title="AI assist"
                            body="Draft copy, summarise feedback and fix errors in place."
                        />
                        <div
                            aria-hidden
                            className="bg-muted/60 relative z-10 mt-5 rounded-lg border p-3 text-xs">
                            <span className="text-muted-foreground">Summarise this week’s feedback</span>
                            <span className="bg-foreground ml-0.5 inline-block h-3.5 w-px align-middle motion-safe:animate-pulse" />
                        </div>
                    </Tile>

                    {/* Integrations: full width */}
                    <Tile className="flex flex-col gap-6 md:col-span-6 md:flex-row md:items-center md:justify-between">
                        <TileText
                            icon={Layers}
                            title="Plays well with your stack"
                            body="Connect GitHub, Slack, Linear, Stripe and 80+ other tools in a couple of clicks."
                        />
                        <ul
                            aria-hidden
                            className="relative z-10 flex flex-wrap gap-2">
                            {['GitHub', 'Slack', 'Linear', 'Stripe', 'Notion', 'Figma'].map((name) => (
                                <li
                                    key={name}
                                    className="bg-background rounded-full border px-3.5 py-1.5 text-sm">
                                    {name}
                                </li>
                            ))}
                        </ul>
                    </Tile>
                </div>
            </div>
        </section>
    )
}