Sparkline

Compact inline chart for embedding trends inside stat cards, table cells, and dashboards. No axes, no labels — just the shape of the data.

Examples

Bar

Reference line

In a stat card

Revenue

$38.2k

+12%

Props

data*
number[] | { value: number }[]
Values to plot. Accepts a plain number array or objects with a value key.
type= 'line'
'line' | 'bar'
Line or bar variant.
color= chart-1
string
Stroke/fill colour. Accepts any CSS colour string.
curveType= 'monotone'
'linear' | 'monotone' | 'step'
Interpolation style (line variant only).
referenceLine= —
number
Draw a dashed horizontal reference line at this value.
valueFormatter= —
(value: number) => string
Format the value shown in the hover tooltip.
height= 48
number
Height in px.
width= '100%'
number | string
Width in px or CSS string.
className= —
string
Extra class on the outer container.