Components / UI components / Data Display
Data DisplayExperimental alpha

Stat

A formatted number with its label, optional change and note, for rows of metrics.

Stat preview

Loading example…

Interactions use local sample data.

Usage and props

Format numbers, units and signs in the application. Trend colour only reinforces text that already carries the sign. Renders on the server.

Supported inputs

This is the public signature used by this example. Open Code to see how the values and callbacks fit together.

label · value · delta? · trend?: up | down | neutral · note? · StatGroup: native div props
How state and callbacks work

These are the main props for the example. The package's TypeScript declarations include the full API.

Customize and use with a keyboard