Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
Revenue
$0
+12.4%vs last month
Churn
0.0%
−0.6%vs last month
A soft card with one headline number, its change and a small trend line.
npx shadcn@latest add ikislay/pixel-ui/stat-tileimport { StatTile } from "@/components/ui/stat-tile"export function Demo() {return (<StatTilelabel="Revenue"value={48210}change={12.4}caption="vs last month"trend={[31, 34, 33, 38, 41, 40, 46, 48]}format={(n) => "$" + Math.round(n).toLocaleString()}/>)}
1// Loading…
Options you can pass to customize this component.
label*stringWhat the number measures.
value*numberThe headline number.
changenumberThe change in percent, like 12.4 or -3. Hidden when unset.
captionstringA short note after the change, like vs last month.
trendnumber[]Recent values, oldest first, drawn as a small line beside the number.
format(value: number) => stringFormats the headline number. Defaults to short numbers like 12.4K.
invertbooleanTreats a fall as good news, for measures like churn or load time.
colorstringAny CSS color for the trend line.
classNamestringMerged onto the root element.