Components / Data

Sparkline macro

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

Built from
Chart
Children
none
Loading the renderer…
Sparkline rendered by the React renderer on Web
Web React
Sparkline rendered by the SwiftUI renderer on iOS
iOS SwiftUI
Sparkline rendered by the Compose renderer on Android
Android Compose
Sparkline rendered by the gpui renderer on Desktop
Desktop gpui

View exponential-ui-sparkline, painted by each native renderer.

tone · neutral
tone · primary
tone · success
tone · warning
tone · danger
tone · info
PropTypeDefaultDescription
valuesrequiredbind[number]–The points, oldest first.
toneneutral | primary | success | warning | danger | info"primary"The line colour tone.
heightnumber24The height in px.

No events, no slots. Children: none.

Role
img
Semantics
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