Documentation

  • 312 sections
  • Solid
  • Tailwind or StyleX

Sparkline

A plain numeric series with zero margins, built for stat cards, table cells and dashboard rows. Set interactive and it scrubs: its own crosshair marks the point under the pointer and onHoverChange reports it, here rolling each card's figure to that hour.

data
Typenumber[] Defaultnone
color
TypeDitherColor Defaultnone
variant
Type"gradient" | "dotted" | "hatched" | "solid" Default"gradient"
seed
Typenumber Defaultnone
markerIndex
Typenumber | null Defaultnull
interactive
Typeboolean (scrub: the crosshair follows the pointer; a slider for the keyboard, arrows, Home, End, Escape) Defaultfalse
label
Typestring (the slider's name, when interactive) Default"Series"
hoverLift
Typeboolean Defaulttrue
sparkles
Typeboolean (the idle drift along the line) Defaulttrue
hovered
Typeboolean Defaultfalse
bloomOnHover
Typeboolean Defaultfalse
class
Typestring Defaultnone
onHoverChange
Type(index: number | null) => void Defaultnone
bloom
Type"off" | "low" | "high" | "aura" Default"off"
animate
Typeboolean Defaultfalse
Add it to your project
One line copies DitherNumberFlow, Sparkline and every kit file they need into your project, in the styling system picked in the header.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherNumberFlow Sparkline