AsterUIDocsv1.0.2

Docs / Component reference

Sparkline

Show the direction of a small series where there is room for only a few words and a line.

Sparkline example

Install

sh
npx @fierst/ui@1.0.2 add sparkline

Registry dependencies: theme.

Exports from ./ui/sparkline: Sparkline.

Download the registry source for sparkline 1.0.2.

API contracts

ts
export function Sparkline({
  values,
  width = 88,
  height = 24,
  tone = 'primary',
  class: extraClass,
}: {
  values: readonly number[];
  width?: number;
  height?: number;
  tone?: 'primary' | 'success' | 'warning' | 'danger';
  class?: string;
})