A tiny trend line for dashboards and tables. The line draws itself in, with a soft area and a dot on the latest value, plus a text summary for screen readers.
Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.
| Prop | Type | Default | Description |
|---|---|---|---|
| data | number[] | The values to plot, oldest first. Needs at least two. | |
| width | number | 120 | Width in pixels. |
| height | number | 36 | Height in pixels. |
| tone | "accent" | "success" | "danger" | "neutral" | "accent" | Colour of the line. |
| area | boolean | true | Fill the area under the line. |
| smooth | boolean | true | Round the corners of the line. |
| aria-label | string | "Trend" | Describes the data for screen readers, such as "Weekly visitors". A summary of the trend is added. |
| className | string | Extra classes added to the outer element. |