DS0
Components

Sparkline

An inline mini chart that visualizes data trends in a compact SVG line.

Overview

Sparkline renders a tiny SVG line or area chart inline with text or data. Shows trend direction at a glance without axes or labels.

Usage

<Sparkline data={[4, 7, 5, 9, 3, 6, 8]} />

With Area Fill

<Sparkline data={revenueData} variant="area" color="var(--color-primary)" />

API Reference

PropTypeDefaultDescription
datanumber[][]Data points
variant'line' | 'area' | 'bar''line'Chart type
colorstring'currentColor'Line/fill color
widthnumber100Chart width
heightnumber24Chart height
strokeWidthnumber1.5Line thickness
ComponentWhen to Use Instead
ChartFull-featured chart
StatCardMetric card with trend
ProgressSingle progress value

On this page