Hero, figure


Install
npx shadcn add https://ui.klarhimmel.com/r/hero-figure.jsonDetailsAbout, usage, props and more
A dark full-height hero where one giant figure in the display font fills the lower right, with a small label top-left, a short note top-right and the headline small at…
Import
Import
- hero/figure
- About
- A dark full-height hero where one giant figure in the display font fills the lower right, with a small label top-left, a short note top-right and the headline small at the bottom-left.
- 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 dark full-height hero where one giant figure fills the lower right and the headline stays small at the bottom left. Use it when a single number is the story, and pick hero-centered when words carry the page.
Writing for it
- Make the figure short, such as a percentage or a year, because it is drawn in the display font as large as the screen allows. - The small label top left says what the figure measures and the note top right says over what period or for whom. - Keep the headline to one sentence, since it is set small and should confirm the figure rather than repeat it.
Watch out for
The figure scales with the screen, and a long value shrinks until it is hard to read. On a phone the label, note and headline stack at the top and the figure sits at the bottom, so check that the pair still reads as one idea.
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 |
|---|---|---|---|
label | string | 'Name the subject' | Text, up to 30 characters. |
note | string | 'Say in one sentence what the figure…' | Text, up to 120 characters. |
title | string | 'Say in one line why this figure mat…' | Text, up to 80 characters. |
figure | string | '00' | Text, up to 4 characters. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |