NeoTerm UI

Sparkline

Tiny inline SVG sparkline chart — no external dependencies.

Import

import { Sparkline } from "neoterm-ui";

Usage

<Sparkline data={[5, 12, 8, 20, 14, 18]} />
<Sparkline data={[5, 12, 8, 20]} width={120} height={32} color="var(--cyan)" fill={false} />

Props

PropTypeDefaultDescription
datanumber[] | SparklinePoint[]Data points.
widthnumber80SVG width.
heightnumber24SVG height.
colorstringvar(--chart-1)Stroke color.
fillbooleantrueShow area fill.
strokeWidthnumber1.5Line stroke width.