Hero, cover


Install
npx shadcn add https://ui.klarhimmel.com/r/hero-cover.jsonDetailsAbout, usage, props and more
Their own photo full-bleed under a dark scrim, with their name or wordmark logo, one line, an optional real rating and one or two buttons on it (the second in the…
Import
Import
- hero/cover
- About
- Their own photo full-bleed under a dark scrim, with their name or wordmark logo, one line, an optional real rating and one or two buttons on it (the second in the brand's second colour), centred or at the foot.
- 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 business whose own site opens on a dark photo with its name or wordmark on it: a bakery, salon, restaurant or shop. Their photo fills the band under a dark scrim, with the name (or their logo), one line, an optional real rating and one button. For a picture beside the words, use hero-split.
Writing for it
- The title (60) is the business's name and the page's h1. With a logo image (light on transparent) the logo shows and the name stays the h1 for screen readers. - The tagline (160) is one line in their words; the rating (80) is their real one as they state it ('4.8 · 612 Google reviews'), else empty. - Use their own photo, wide, with the subject away from the middle third where the text sits. The alt names what is in it.
Watch out for
The scrim never goes under 55% black, so a bright photo comes out darker than the source. Text and the button stay light in dark mode too. Without a photo a real page shows a plain near-black band; the directory and the editor keep the slot.
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 |
|---|---|---|---|
title | string | 'Business name' | Text, up to 60 characters. |
titleStrong | string | '' | Text, up to 40 characters. Optional; empty is not rendered. |
logo | Media | {…} | See the type. |
tagline | string | 'Say what you offer, where and since…' | Text, up to 400 characters. |
rating | string | '0.0 · 000 reviews' | Text, up to 80 characters. |
action | Link | {…} | See the type. |
secondaryAction | Link | - | Optional; empty is not rendered. |
media | Media | {…} | See the type. |
align | 'center' | 'start' | 'center' | One of 'center', 'start'. Optional; empty is not rendered. |
alignPhone | 'center' | 'start' | - | One of 'center', 'start'. Optional; empty is not rendered. |
fullHeight | boolean | - | Optional; empty is not rendered. |
actionsBelow | boolean | - | Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |