Lab

Stat cards

Slant / Data

Headline numbers with a trend and a sparkline, switchable between periods.

The theme follows the link: share a page with ?theme=moon.

Usage

  • The period switch is a group of toggle buttons with aria-pressed.
  • Sparklines are decorative; the numbers and trend text carry the data.

Keyboard

Tabreaches the period buttons
Enter / Spaceselects a period

Accessibility

  • Trend arrows are hidden from assistive technology; the percentage is text.

Stat cards in React and SwiftUI.

Source

The React tab is the component’s real source; the SwiftUI tab is its twin in TUTTNKit.