Hero, two by two


Install
npx shadcn add @klarhimmel/hero-split-gridDetailsAbout, usage, props and more
A two-by-two grid: the heading and lead top left, a picture top right, a short paragraph with the buttons bottom left and a second picture bottom right.
Import
Import
- hero/split-grid
- About
- A two-by-two grid: the heading and lead top left, a picture top right, a short paragraph with the buttons bottom left and a second picture bottom right. One column on a phone, in reading order.
- 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
A two-by-two opening: the heading and lead top left, a picture top right, a short paragraph with the buttons below it and a second picture bottom right. For one picture use hero-split.
Writing for it
- Title up to 100 characters, lead up to 200, the paragraph beside the buttons up to 200. - The first picture takes a caption up to 120 characters; the second has none. - Two buttons at most.
Watch out for
The grid reads in rows, left to right, so the paragraph and buttons on the left answer the heading above them, not the picture beside them. On a phone everything stacks in that order, so the two pictures are separated by text.
Pairs well with
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. |
body | string | 'Say in a sentence what happens next…' | Text, up to 200 characters. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
closing | Media | {…} | See the type. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |