Hero, picture on both ends


Install
npx shadcn add @klarhimmel/hero-media-bookendsDetailsAbout, usage, props and more
One column: a wide picture, then a centred label, heading, lead and two buttons, then a second wide picture with a caption under it.
Import
Import
- hero/media-bookends
- 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 tall one-column opening with a picture before the text and another after it, for a page that shows two views of one subject. For a single picture use hero-centered.
Writing for it
- Title up to 100 characters; description up to 200. - The first picture leads the page, so give it the strongest subject; the second one needs a caption up to 120 characters. - Two buttons at most, centred under the lead.
Watch out for
Both pictures are wide 16 by 9 bands, so the section is long on a phone. Use two different views, not the same picture twice, and keep the text between them short enough that the second picture is still near.
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 |
|---|---|---|---|
media | Media | {…} | See the type. |
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. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
closing | Media | {…} | See the type. |
caption | string | 'Say what the picture shows.' | Text, up to 120 characters. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |