Sparkline
Compact SVG line chart from an array of numbers, with a currentColor stroke and fading area fill. Missing values break the line, one point draws a dot, and an aria-label exposes it as an image.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
Installation
pnpm dlx shadcn add @01orbital/sparklinenpx shadcn add @01orbital/sparklineyarn shadcn add @01orbital/sparklinebunx --bun shadcn add @01orbital/sparklinePart of the 01orbital library. With a license, put ORBITAL_TOKEN in .env.local and the same command installs it (licensed install, pricing).
It lands at components/graphics/sparkline.tsx, as source you own and edit.
Usage
import { Sparkline } from "@/components/graphics/sparkline"
export default function SparklineDemo() {
const data = [8, 10, 9, 13, 11, 16, 14, 18, 15, 21, 19, 24]
return (
<div className="grid text-primary">
<Sparkline
data={data}
width={260}
height={80}
aria-label="Signups rising over 12 weeks, from 8 to 24"
className="w-72"
/>
</div>
)
}API reference
Prop
Type
It also accepts the HTML attributes of the element it renders.
Dependencies
npm: cn. The CLI installs them for you.
No other registry pieces.
More Graphics
Scratch Reveal
Painted panel whose paint wears away on hover to expose a pencil construction sketch, with the label switching to the canvas ink. Paint, canvas, sketch and ink are CSS variables that default to theme colors; decorative, and reduced motion skips the fade.
Speed Limit Sign
North American speed limit sign: the limit in black on a white face inside a black border.