Skip to content
SENVENLI UI

Stat

A key figure with its label, an optional change against a named period and a sparkline.
Key figures in a row
import { Stat, StatGroup } from "@senvenli/react/display";

Examples

With a sparkline

A short series under the figure shows the shape of the period.

Guidelines

When to use it

  • A dashboard's headline numbers.

Use something else when

Accessibility

Built in

  • The change is announced in words, not only by its arrow and color.
  • Figures keep their formatted order in right-to-left pages.

You provide

  • A formatted value and, next to a change, the period it compares against.

API reference

Stat

labelRequired
React.ReactNode
valueRequired
React.ReactNode

The figure, already formatted with Intl ("$48,920").

delta
StatDelta
comparison
React.ReactNode

The period the delta compares against ("vs. September"); required next to a delta.

trend
number[]

A short series for the sparkline.

href
string

Makes the whole tile a link to the report behind it.

StatGroup

childrenRequired
React.ReactNode
aria-label
string