Skip to content
caliper ui pro docs

Lesson path

A course as a winding path of round lessons: finished ones are filled with a tick, the current one bobs gently under a Start flag, and locked ones wait in grey. Each node opens a small card with Start, Practise again, or what unlocks it.

Pro

Press a lesson.

When to use

  • Learning products, onboarding courses and challenge programmes.
  • Any sequence where people return to the next step.

When not to use

  • Steps people do once in one sitting; use `Stepper`.
  • Non-linear content people browse freely.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/lesson-path

Adds its 4 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

LessonPath

4 props

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

PropTypeDefaultDescription
lessons *Lesson[]—
onStart((lesson: Lesson) => void)—
startLabelstring"Start"Label of the start button.
swingnumber64How far the path swings left and right, in px.

Keyboard

  • Keyboard and focus come from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.

Accessibility

It is built on native elements and keeps aria-label and aria-hidden in step with state.

Notes for AI

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

/docs/components/lesson-path.md

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

More in Compare & browse