Hero, header row


Install
npx shadcn add https://ui.klarhimmel.com/r/hero-header-row.jsonDetailsAbout, usage, props and more
A heading and a short lead on the left with the actions on the same row at the right, and a wide picture below, with an optional caption.
Import
Import
- hero/header-row
- About
- A heading and a short lead on the left with the actions on the same row at the right, and a wide picture below, with an optional caption. On a phone the actions stack under the lead, full width, and the picture follows.
- 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 heading and short lead at the left with the actions on the same row at the right, then one wide picture and an optional caption. Pick hero-media-foot when the picture should come first.
Writing for it
- Choose the title size for the page: title for a modest heading and display for a large page opening. - Use the shape of the picture to set the pace. Wide is 21 by 9 and cinema is 16 by 7, so a cinema crop wants a subject along the middle. - Add the caption only when it tells the reader something the picture does not, such as a place or a date.
Watch out for
On a phone the actions stack under the lead at full width and the picture follows at 4 by 3, so the crop changes. Check that the subject survives both shapes.
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 two words' | Text, up to 40 characters. |
title | string | 'Say in one line what this page is a…' | Text, up to 100 characters. |
headingSize | 'title' | 'display' | 'title' | One of 'title', 'display'. Optional; empty is not rendered. |
description | string | 'Write one or two short lines on wha…' | Text, up to 200 characters. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | Optional; empty is not rendered. |
media | Media | {…} | See the type. |
caption | string | '' | Text, up to 120 characters. |
pictureShape | 'wide' | 'cinema' | 'wide' | One of 'wide', 'cinema'. Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |