Skip to content
Haze UI

Bento tile

A feature tile with an optional edge-to-edge visual, a caption, and room for controls or supporting content.

pnpm dlx shadcn@latest add @haze/bento-tile
Open preview in a new tab
Liveno JavaScript

When to use

  • You need a shared panel treatment across a product mosaic.
  • One panel should receive a restrained brand tint.

When not to use

  • The whole surface needs to be a single link.

Installation

Add the Haze registry to components.json once, then install Bento tile with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/bento-tile
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
title*string–Visible panel heading.
descriptionstring–Supporting text below the title.
headingLevel2 | 3 | 43Heading level in the surrounding document.
spanquarter | third | half | two-thirds | three-quarters | fullthirdColumn span inside Bento Mosaic. Full spans both columns at intermediate widths.
variantdefault | infodefaultNeutral surface, or a raised neutral surface with a stronger border for emphasis.
default slotslot–Content or controls in the panel body.
visual slotslot–Artwork or a working product sample above the caption. Give meaningful diagrams a text equivalent.
accessory slotslot–Compact header detail such as a status.
classstring–Classes on the article.
bodyClassstring–Classes on the body grid.
visualClassstring–Sizing, alignment and surface classes for the visual slot.

Accessibility

  • Pick a heading level that matches the outline.
  • Controls keep their native focus order. Hide decorative artwork from assistive technology.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI component "Bento tile" with `npx shadcn@latest add @haze/bento-tile`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/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 BentoTile from "@/components/haze/ui/bento-tile.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: http://localhost:4329/ui/bento-tile.md

  • Customize with real content

    Adapt the Haze bento-tile ui for our product. Replace the demo values of these props with our real content: title, description, headingLevel, span, variant, default slot, visual slot, accessory slot, class, bodyClass, visualClass. Keep the layout, the heading level rules and these accessibility details: Pick a heading level that matches the outline. Controls keep their native focus order. Hide decorative artwork from assistive technology. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using bento-tile, check it fits: use it when you need a shared panel treatment across a product mosaic.; one panel should receive a restrained brand tint.. Avoid it when the whole surface needs to be a single link.. Alternatives: @haze/card, @haze/bento-mosaic.

Dependencies

  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog