# Bento: four tiles with one hero tile

> Asymmetric four-tile grid; the first tile spans two columns and rows, and each tile is a flat panel with a visual on top and copy below.

- Kind: block · Category: Bento · Interactivity: none
- Install: `npx shadcn@latest add @haze/bento-grid`
- File: `src/components/haze/blocks/bento-grid.astro`
- npm dependencies: none
- Registry dependencies: @haze/placeholder, @haze/utils
- Docs page: https://hazeui.com/blocks/bento-grid

## Use when
- Showcasing three to five features where one is clearly the headline
- Feature visuals matter more than the copy

## Avoid when
- You have more than five features of equal weight; use features-icon-grid

## Alternatives
- [features-icon-grid](https://hazeui.com/blocks/features-icon-grid.md)

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| title | `string` | demo heading | no | Section heading (h2). |
| description | `string` | demo copy | no | Intro paragraph. |
| items | `{ title: string; description: string; visual: "app" \| "chart" \| "photo" }[]` | 4 demo tiles | no | Tiles in order; the span pattern repeats every four. Tiles do not move on hover because they are not links. |

## Accessibility
- Tiles are list items with h3 headings, so reading order matches the visual order on every breakpoint.
- Visuals are decorative placeholders; give real images alt text when you replace them.

## Agent prompts

### Install and use

Install the Haze UI block "Bento: four tiles with one hero tile" with `npx shadcn@latest add @haze/bento-grid`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "https://hazeui.com/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import BentoGrid from "@/components/haze/blocks/bento-grid.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: https://hazeui.com/blocks/bento-grid.md

### Customize with real content

Adapt the Haze bento-grid block for our product. Replace the demo values of these props with our real content: title, description, items. Keep the layout, the heading level rules and these accessibility details: Tiles are list items with h3 headings, so reading order matches the visual order on every breakpoint. Visuals are decorative placeholders; give real images alt text when you replace them. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using bento-grid, check it fits: use it when showcasing three to five features where one is clearly the headline; feature visuals matter more than the copy. Avoid it when you have more than five features of equal weight; use features-icon-grid. Alternatives: @haze/features-icon-grid.

## Example requests that should lead here
- Add a bento grid of four feature cards with one big card
- Feature showcase with asymmetric cards and screenshots

## Source

```astro
---
import { cn } from "../../../lib/haze/utils";
import Placeholder from "../ui/placeholder.astro";

interface Props {
  title?: string;
  description?: string;
  items?: { title: string; description: string; visual: "app" | "chart" | "photo" }[];
}

const {
  title = "One workspace for the whole product cycle",
  description = "From the first idea to the release note, every step lives in the same place.",
  items = [
    { title: "Roadmaps that stay current", description: "Projects roll up into initiatives, and progress updates itself from the work underneath.", visual: "app" },
    { title: "Cycle analytics", description: "Spot scope creep before it ships late.", visual: "chart" },
    { title: "Triage inbox", description: "Route incoming bugs and requests in seconds.", visual: "photo" },
    { title: "Release notes in one click", description: "Turn merged work into a changelog your customers will actually read.", visual: "chart" },
  ],
} = Astro.props;
// Four columns from lg: the first tile is 2x2, the last is wide. At md (two columns) the first and last tiles span both columns, so every row is full.
const spans = ["md:col-span-2 lg:row-span-2", "", "", "md:col-span-2"];
---

<section aria-labelledby="bento-grid-title" class="bg-background px-6 py-20 sm:py-24">
  <div class="mx-auto max-w-6xl">
    <h2 id="bento-grid-title" class="max-w-2xl text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</h2>
    <p class="mt-4 max-w-2xl text-base/7 text-pretty text-muted-foreground">{description}</p>
    <ul class="mt-12 grid auto-rows-fr gap-4 md:grid-cols-2 lg:grid-cols-4">
      {
        items.map((item, i) => (
          <li class={cn("flex flex-col overflow-hidden rounded-2xl border border-border bg-card", spans[i % spans.length])}>
            <Placeholder variant={item.visual} class="min-h-48 flex-1 rounded-none border-0 border-b border-border" />
            <div class="p-6">
              <h3 class="text-[0.9375rem]/6 font-semibold tracking-tight text-card-foreground">{item.title}</h3>
              <p class="mt-2 text-sm/6 text-muted-foreground">{item.description}</p>
            </div>
          </li>
        ))
      }
    </ul>
  </div>
</section>
```
