Pro
Draw on
Wraps an inline SVG so its strokes draw themselves in, one after another, when it scrolls into view. Nodes can fade in after their line arrives.
pnpm dlx shadcn@latest add @caliper/draw-onWhen to use
Use it for
- Diagrams, routes and underlines that tell a story in order.
- A check mark or chart line that should feel drawn, not placed.
Skip it when
- Icons and anything in a list; drawing is for a moment, not for rows.
- Filled artwork; only strokes draw.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Order is document order
- Each stroke starts 140ms after the one before it, so the order you write the shapes in is the story the drawing tells. Nothing is communicated by order alone.
- Without script it is already drawn
- Strokes only start hidden once the part is ready, so a page without JavaScript, and reduced motion, show the finished drawing.
Usage
- Replay with a key
- Change the key to play it again. The SVG still needs its own accessible name.
Installation
pnpm dlx shadcn@latest add @caliper/draw-on
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { DrawOn } from "@/components/ui/draw-on"
The worked example comes with Pro
The 45-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
DrawOn
component
Also accepts the native props of its root element and a ref.
Accessibility
It is built on native elements, so roles and focus come from the browser.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- Line chartOne or more series over time, with hover readout and an optional band.
- Result iconThe outcome of an operation as a mark that draws itself once: a check, a cross, an exclamation, or a turning arc only while pending.
- Scroll effectsTools for effects that follow scroll position, such as progress and reveals.