[ Data Display ]
Stat
Metric building blocks: Stat shows a label, a big value and a trend chip; DateTile shows a calendar-page date.
2 examplesDark modeAccessible
Import#
import { Stat, DateTile } from 'reusify-ui';When to use#
- KPI cards and dashboards (Stat).
- Event lists, agendas and invitations (DateTile).
Examples#
Stat with trend#
Positive trends are green and negative ones red. Use invertTrend when going down is good (costs, churn).
Total new users8.2% increase
5,9k
Revenue2.6% decrease
$48,2k
vs. last week
Churn0.4% decrease
2.1%
<Stat label="Total new users" value="5,9k" trend={8.2} />
<Stat label="Revenue" value="$48,2k" trend={-2.6} helpText="vs. last week" />
<Stat label="Churn" value="2.1%" trend={-0.4} invertTrend size="sm" />DateTile#
<DateTile date="2026-10-20" />
<DateTile date={new Date()} color="#7c3aed" size="lg" />
<DateTile date="2026-12-31" color="danger" size="sm" />Used in designs#
Stat in real layouts: these 2 designs use it. Open one to try it and copy the code.
API reference#
<Stat />
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | - | Small uppercase label. |
value | ReactNode | - | The metric. |
trend | number | - | Change in percent; sign picks the arrow. |
trendLabel | ReactNode | - | Custom chip text instead of "8.2%". |
invertTrend | boolean | false | Treat decreases as good. |
helpText | ReactNode | - | Muted line under the value. |
size | 'sm' | 'md' | 'lg' | 'md' | Value size. |
align | 'start' | 'end' | 'start' | Text alignment. |
label-ReactNodeSmall uppercase label.
value-ReactNodeThe metric.
trend-numberChange in percent; sign picks the arrow.
trendLabel-ReactNodeCustom chip text instead of "8.2%".
invertTrendfalsebooleanTreat decreases as good.
helpText-ReactNodeMuted line under the value.
size'md''sm' | 'md' | 'lg'Value size.
align'start''start' | 'end'Text alignment.
<DateTile />
Renders a <time> element.
| Prop | Type | Default | Description |
|---|---|---|---|
date | Date | string | - | The date to show. |
color | semantic | string | 'primary' | Month band color. |
size | 'sm' | 'md' | 'lg' | 'md' | Tile size. |
date-Date | stringThe date to show.
color'primary'semantic | stringMonth band color.
size'md''sm' | 'md' | 'lg'Tile size.
Accessibility#
- Stat trends include visually hidden "increase" / "decrease" text, so color is not the only signal.
- DateTile is a <time dateTime> with the full date as its accessible name.