Stats
Stats component to highlight key numbers with trend arrows, icons and a responsive grid.
How to use it
Run npx @blossomui/react add stats, or copy src/components/UI/Stats/Stats.tsx into your React project and import it.
import { Stat, Stats } from './components/ui/Stats'Props
StatProps
| Prop | Type | Description |
|---|---|---|
| label (required) | string | |
| value (required) | string | number | |
| change | string | Change since the previous period, for example "+12%". |
| trend | 'up' | 'down' | 'neutral' | Colors the change: `up` is green, `down` is red and `neutral` is gray. |
| icon | ReactNode | |
| trendData | number[] | Recent values, drawn as a small line under the number. |
StatsProps
| Prop | Type | Description |
|---|---|---|
| items (required) | StatProps[] |