Component · C-040
Sparkline
A small SVG chart for a short series. It normalizes values to the visible range and exposes an accessible name; it does not replace the KPI's textual value.
Install
Install koten-theme first when the project has no Koten tokens yet.
npx shadcn@latest add https://koten.codehive.com.co/r/sparkline.jsonAccessibility
- The SVG uses role="img" and aria-label, and includes a <title> with the same description.
- It is decorative when the value is already text; the label should describe the trend.
- It does not replace a table or a textual value: the trend is not announced as exact data.