Case study, metrics


Install
npx shadcn add @klarhimmel/case-study-metricsDetailsAbout, usage, props and more
One customer story led by its numbers: headline and summary, a row of two to four big metrics, then a quote beside a photo and a link to the full story.
Import
Import
- case-study/metrics
- Category
- One customer story: the problem, the work, the result. New project? Set it up once: /get-started/installation.
Notes
When to use it
One customer story that opens with its numbers: a row of two to four big metrics, then a quote beside a photo. Pick case-study-story when the story has no figures to show, and case-study-card for several customers.
Writing for it
- Metric values hold 20 characters, so use '48%' or '2.1 h', not a phrase. The 80 character label under each says what the number counts. - The quote has 320 characters and is set large on wide containers. Take it from the customer and attach the name and the role, both required for the caption. - The summary (400 characters) sits beside the title and is optional, so use it for context the metrics do not give, like the size of the client.
Watch out for
With four metrics the numbers use the smaller title size so they fit, with two or three they are larger. Adding a fourth metric therefore changes how loud the row looks, not only how wide it is.
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 |
|---|---|---|---|
eyebrow | string | 'Name the section' | Text, up to 60 characters. |
client | string | 'Name a client' | Text, up to 60 characters. |
title | string | 'Say what the client achieved, with …' | Text, up to 140 characters. |
summary | string | 'Say in two sentences what the clien…' | Text, up to 400 characters. |
metrics | { value, label }[] | 4 items | List of 2 to 4. Each item: value, label. |
quote | string | 'Quote the client, in their words, o…' | Text, up to 320 characters. |
name | string | 'Name a person' | Text, up to 60 characters. |
role | string | 'Their role, and the business' | Text, up to 80 characters. |
media | Media | {…} | See the type. |
link | Link | {…} | See the type. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |