Sparkline
Axis-less inline trend.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
Axis-less inline trend.
Accessibility
Each chart ships an accessible fallback (a visually-hidden data table / aria-label summary) so the data is available to screen readers, not just sighted users. Colour is paired with shape/label, never used alone.
Install and import
npx shadcn@latest add @prism/sparkline
import { Sparkline } from '@/components/prism/Sparkline';
In a no-build prototype, read it from the bundle instead: const { Sparkline } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
data | number[] | Yes | |
height | number | — | |
color | string | — | |
area | boolean | — | |
strokeWidth | number | — | |
label | string | — |