A compact glanceable card: a title, one big figure with a caption beside it, and a footnote under a
hairline rule. Weather, a single KPI, a queue depth. For several related figures use a Grid of
Stats instead.
tsx
<WidgetCard />Examples
Pass onOpen (and openLabel, its accessible name) to turn the title into a button with a trailing
arrow:
tsx
<WidgetCard
title="Toronto"
value="5°"
caption="overcast clouds"
footer="Feels like 1°."
onOpen={() => {}}
openLabel="Open Toronto forecast"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| caption | readonly | — | Short descriptor beside the figure (`"overcast clouds"`). |
| footer | readonly | — | Small-print line under the divider. |
| onOpen | readonly | — | When set, the title becomes a button with a trailing arrow. Needs `openLabel`. |
| openLabel | text | — | Accessible name of the open button. |
| title * | readonly | — | Heading of the widget — a place, a metric name. |
| value * | readonly | — | The headline figure, already formatted (`"5°"`). |