Hero, facts


Install
npx shadcn add https://ui.klarhimmel.com/r/hero-facts.jsonDetailsAbout, usage, props and more
A hero with no picture: one large sentence, a thin rule, then two to four facts stacked under it, each a small label, a large value and an optional link (the next date…
Import
Import
- hero/facts
- About
- A hero with no picture: one large sentence, a thin rule, then two to four facts stacked under it, each a small label, a large value and an optional link (the next date and tickets, where, opening hours, a price from).
- 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
An opener with one large sentence and two to four facts stacked under a thin rule, for an event, a venue or a trade whose visitors want the date, the place and the hours first. Use hero-centered when the page opens on a promise instead.
Writing for it
- Write each fact as a small label over a large value, such as Next date over a day and month, so the stack scans like a timetable. - Link a fact only when its page adds something, like the event or a map. The label and value then act as one link. - Use the further step under a fact for one action, such as booking or directions, and leave its label empty when there is none.
Watch out for
The stack holds only two to four facts, and a fifth would need a different block. Write values that fit on one line at display size, since a long value wraps and breaks the rhythm.
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 | 'Say in one sentence what you are an…' | Text, up to 160 characters. |
facts | { label, value, href, link }[] | 2 items | List of 1 to 4. Each item: label, value, href (optional), link (optional). |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |