Skip to content

Sparkline

A tiny inline trend line of recent values, no axes or legend.

Group: Data · Kind: macro

example
tone · neutral
tone · primary
tone · success
tone · warning
tone · danger
tone · info

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-sparkline on Web
exponential-ui-sparkline on iOS
exponential-ui-sparkline on Android
exponential-ui-sparkline on Desktop
Prop Type Required Bindable Description
values [number] yes yes The points, oldest first.
tone neutral | primary | success | warning | danger | info – – The line colour tone. Default "primary".
height number – – The height in px. Default 24.

None.

None.

none

No basic catalog component maps here.

Chart

Role: img

img with a generated summary (first, last, min, max). The Chart painter names it with sparklineSummary (first, last, min, max).

Not focusable; no keys.

Recipe parts: Sparkline/root

Keyed by: tone :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover

Themes · Write a theme

Chart · StatTile · Table