Stats, split


Install
npx shadcn add @klarhimmel/stats-splitDetailsAbout, usage, props and more
Heading and one oversized headline figure on the left, two to four supporting numbers in a hairline grid on the right. Use when one number matters more than the rest.
Import
Import
- stats/split
- Category
- A few numbers that prove the point. New project? Set it up once: /get-started/installation.
Notes
When to use it
A heading and one oversized headline figure on the left, with two to four supporting numbers on the right. Use it when one number matters more than the rest; stats-row is the version where all are equal.
Writing for it
- The highlight value holds 20 characters and is drawn at display size in the accent colour. Choose the one number you would say out loud first. - The highlight note (160 characters) is optional and good for the source or time frame of that figure. - The supporting items take a 20 character value and an 80 character label each, and two to four fit in a two-column grid.
Watch out for
The highlight is not repeated in the item list, so do not put the same number in both. With an odd number of supporting items the grid on the right has one empty cell.
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 topic' | Text, up to 60 characters. |
title | string | 'Say what the numbers mean for the r…' | Text, up to 120 characters. |
description | string | 'Say what the figures are measured a…' | Text, up to 300 characters. |
highlight | { value, label, note } | {…} | Fields: value, label, note. |
items | { value, label }[] | 4 items | List of 2 to 4. Each item: value, label. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |