Hero, bento cells


Install
npx shadcn add @klarhimmel/hero-bento-cellsDetailsAbout, usage, props and more
An uneven mosaic of cells on a twelve-part grid: a tall heading cell, a picture, two large-figure cells, a wide picture and a small card with the buttons.
Import
Import
- hero/bento-cells
- About
- An uneven mosaic of cells on a twelve-part grid: a tall heading cell, a picture, two large-figure cells, a wide picture and a small card with the buttons. Two columns on a tablet, one on a phone.
- Category
- The first screen: what it is, who it is for, what to do next. New project? Set it up once: /get-started/installation.
Notes
When to use it
An uneven mosaic opening: a tall heading cell, a picture, two large figures, a wide picture and a small card with the buttons. Use stats-cards when the figures are the point and there are no pictures.
Writing for it
- Title up to 100 characters; lead up to 200. - Two figure cells: a value up to 20 characters and a label up to 60; the first is tinted, the second quiet. - The card takes a title up to 80, a line up to 160 and up to two buttons.
Watch out for
Every cell is real content, so fill all of them or use a simpler hero. The grid has twelve parts on a wide screen, six on a tablet and one on a phone, and the cells keep their order, so the figures land between the two pictures.
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Name the topic in a few words' | Text, up to 40 characters. |
title | string | 'Say in one line what the visitor ge…' | Text, up to 100 characters. |
description | string | 'Say what the page offers and who it…' | Text, up to 200 characters. |
media | Media | {…} | See the type. |
caption | string | 'Say what the picture shows.' | Text, up to 120 characters. |
stats | { value, label }[] | 2 items | List of 2 to 2. Each item: value, label. |
closing | Media | {…} | See the type. |
closingCaption | string | 'Say what the picture shows.' | Text, up to 120 characters. |
cardTitle | string | 'Say what the visitor can do next' | Text, up to 80 characters. |
cardText | string | 'Say in a sentence why it is worth d…' | Text, up to 160 characters. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |