caliper uidocs

Onboarding template

Pro

Set-up that states how long it takes, says why each step is asked, lets you skip, saves as you go and ends with what now exists.

Installs components/ui/onboarding-template.tsxDepends on @radix-ui/react-slot, lucide-reactMotion shared motion tokens
pnpm dlx shadcn@latest add @caliper/onboarding-template
Step 1 of 3 · 1 min

Name your workspace

It appears on invoices and in invitations.

Enter a name to continue.

When to use #

Use it for

  • First-run set-up with three to six steps.
  • Steps people may need to finish later.

Skip it when

  • A single form; use fields and a button.
  • Checkout; use the checkout screen.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/onboarding-template

Adds its 3 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.

example.tsx
import { OnboardingTemplate } from "@/components/ui/onboarding-template"

The worked example comes with Pro

The 40-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

OnboardingTemplate

component
PropTypeDefaultDescription
title *string—
steps *readonly OnboardingTemplateStep[]—
storageKeystring—Saves progress in this browser under this key.
summary *(values: Record<string, string>) => readonly string[]—What exists now, given the values.
onFinish((values: Record<string, string>, skipped: string[]) => void)—
classNamestring—

Accessibility #

It exposes progressbar and status semantics, with aria-label, aria-current, aria-hidden, aria-valuemin, aria-valuemax and aria-valuenow kept in step with state. Changes that matter are announced through a live region.

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

Motion #

Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.