loadercn.

Chart loader

Sparkline

A live sparkline scrolls past while a dot tracks the latest value. A single React component with its CSS built in and no dependencies. Install it with the shadcn CLI or copy the source.

Preview and installation

Size
48px
Cycle
3.2s
Color

Run this command in any project set up with shadcn.

npx shadcn@latest add https://loadercn.vercel.app/r/chart-sparkline.json

Added the @loadercn registry? Use the short form:

npx shadcn@latest add @loadercn/chart-sparkline

Then add it to your interface:

import { ChartSparkline } from "@/components/ui/chart-sparkline"

<ChartSparkline size={48} speed={3.2} />

Inherits text color. Accepts className, style, and a custom loading label. Respects reduced-motion preferences.

When to use it

Fits stat cards, table rows, and live metrics. Suggests a value that is streaming in rather than a single fetch.

Props

Sparkline accepts size, speed, label, className, and style, like every loader in the collection. See the installation guide for the full reference.