Pro
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.
pnpm dlx shadcn@latest add @caliper/lesson-pathWhen to use
Use it for
- Learning products, onboarding courses and challenge programmes.
- Any sequence where people return to the next step.
Skip it when
- Steps people do once in one sitting; use `Stepper`.
- Non-linear content people browse freely.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Opens where you are
- The path scrolls itself so the current lesson is centred, inside its own container, without moving the page.
- Locked is still reachable
- Locked lessons stay focusable and their card says what unlocks them, instead of being silently disabled.
Styling
- Depth from the face
- Nodes have the same pressed-edge depth as
PushButton: green once done, the accent for the current lesson, grey while locked.
Installation
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.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { LessonPath } from "@/components/ui/lesson-path"
The worked example comes with Pro
The 34-line example behind the preview opens here, ready to copy.
- 576 Pro parts, blocks and page templates, all with source
- $199 once, with a year of updates. What you have stays yours
- A full refund within 14 days if it is not for you
API reference
LessonPath
component
Also accepts the native props of its root element and a ref.
Accessibility
It is built on native elements and keeps aria-label and aria-hidden in step with state.
Keyboard and focus handling comes from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.
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
- StepperShows where someone is in a multi-step flow and lets them go back.
- Setup guideOnboarding that waits until wanted: a corner launcher shows setup progress and opens into the checklist, with the next step open and its action ready.
- Push buttonA chunky button with visible depth: the face sits on its own edge, lifts a pixel on hover, travels down onto the edge when pressed and springs back when let go. For playful flows such as onboarding, lessons and rewards.