Hero, card cover


Install
npx shadcn add https://ui.klarhimmel.com/r/hero-card-cover.jsonDetailsAbout, usage, props and more
A full-width picture with one centred card over it holding a small label, the heading, one line and two actions.
Import
Import
- hero/card-cover
- About
- A full-width picture with one centred card over it holding a small label, the heading, one line and two actions. The card keeps its width on a phone and the actions stack.
- 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 full-width picture with one centred card over it that holds a label, the heading, a line and two actions. Pick hero-split when the picture should sit beside the text and stay fully visible.
Writing for it
- Choose a picture that stays calm behind a pale card, because the card hides the middle of it and the edges carry the mood. - Write the label as two or three words naming the topic, the heading as the one promise, and use the two actions for the main step and a softer one. - Set the alignment to center for a short, formal opener and to start when the heading runs to two lines.
Watch out for
When the band is set to fill the screen height, a busy photograph can pull attention away from the card. Without it the band is only as tall as the card plus padding, which suits a quieter page.
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 two or three words' | Text, up to 40 characters. |
title | string | 'Say what this page offers, in plain…' | Text, up to 80 characters. |
description | string | 'Give the reader a short reason to k…' | Text, up to 200 characters. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | Optional; empty is not rendered. |
fullHeight | boolean | true | See the type. |
align | 'start' | 'center' | 'start' | One of 'start', 'center'. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |