Components / Charts

Sparkline

A tiny inline trend line.

@ruckc/truss-chart Charts

Import

import { Sparkline } from '@ruckc/truss-chart';
import '@ruckc/truss-chart/charts.css'; // series palette

Playground

values
width
height

API

PropTypeDefaultDescription
values required (number | null)[]—The numbers to plot.
width number120Width in pixels (or any CSS length).
height number28Height in pixels (or any CSS length).
color stringseriesColor(0)Series colour (a CSS colour or `var(--trc-sN)` token).
label string'Trend'Visible label shown above the control.
/docs/sparkline Truss UI · MIT