Skip to content

Stat

Displays a single statistic with a bold value and a label. Place multiple Stat components in a row for stat groups.

Also known as: metric, counter, figure, key figure, KPI

View in Storybook

When to use

  • Showing numeric metrics like follower counts, order totals, or completion rates.
  • Displaying key-value pairs in profile cards or dashboards.
  • Building stat rows in card footers.

Import

tsx
import { Stat } from '@vacano/ui'

Usage

tsx
<Stat value="97.1K" label="Followers" />

Group of stats

tsx
<div style={{ display: 'flex', gap: 16 }}>
  <Stat value="4" label="Following" />
  <Stat value="97.1K" label="Followers" />
</div>

Various examples

tsx
<Stat value="$12,450" label="Revenue" />
<Stat value="1,024" label="Orders" />
<Stat value="89%" label="Completion" />

Props

PropTypeDefaultDescription
valueReactNoderequiredThe stat value (bold, dark text)
labelstringrequiredDescription label (gray text)
refRef<HTMLSpanElement>-Forwarded ref
classNamestring-CSS class name for the root element
classnamesStatClassNames-Custom class names for sub-elements

ClassNames

KeyDescription
valueThe bold value element
labelThe gray label element
  • Card - Often used in CardFooter
  • Overline - Category label component

Released under the MIT License.