Skip to main content

Stats

Responsive grid of metric items with labeled values. Each item can be tinted with a primary or accent color.

Use it to display key numbers on a landing page.

Summary

The Stats component renders a <section> containing a grid of value–label pairs. Each item can be color-coded using the color property to draw attention with the preset's primary or accent color.

Why Use This Component?

  • Highlight key numbers with consistent formatting across pages.
  • Color-coded values using the active preset's primary or accent palette.
  • Preset-aware — typography and spacing adapt to the active preset.

Usage

Options

PropTypeDefaultDescription
itemsArray<{ value: string, label: string, color?: 'primary' | 'accent' }>Metric items. Required.
headingstring | undefinedundefinedOptional section heading above the grid.
descriptionstring | undefinedundefinedOptional description paragraph below the heading.
surface'alt' | undefinedundefinedSet to 'alt' to use the alternate surface background.

Troubleshooting

  • Color not applying — The color prop accepts 'primary' or 'accent' only. If omitted, the value renders without a color accent.