Skip to content
caliper ui pro docs

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.

Pro
CommitBuild3 checksProduction

When to use

  • Diagrams, routes and underlines that tell a story in order.
  • A check mark or chart line that should feel drawn, not placed.

When not to use

  • Icons and anything in a list; drawing is for a moment, not for rows.
  • Filled artwork; only strokes draw.

Installation

terminal
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.

API reference

DrawOn

3 props

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
staggernumber140Delay between one shape starting and the next, in milliseconds.
oncebooleantrueDraw the first time it enters view (true), or every time it does (false).
thresholdnumber0.35How much of it must be in view to start, from 0 to 1.

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It is built on native elements, so roles and focus come from the browser.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/draw-on.md

The index of every part is at /llms.txt.

More in Surfaces