Onboarding checklist
Onboarding checklist
The first five things, ticked off in place: a ring that fills, checks that draw, and a finish worth seeing.
Dependencies
Interaction states
- next — The first open task is expanded with its description and action, on a soft tint.
- doing — A spinner opens in the button and its label morphs to pendingLabel while your promise runs.
- ticked — The ring blurs into a filled circle and its check draws (380ms); a strike draws through the label (480ms); this task folds and the next opens (420ms). The ring advances and the count rolls.
- picked — Clicking any row opens it, done or not; finishing a task returns to the next open one.
- folded — The chevron folds the list to the header, which keeps the ring and count.
- done — The list folds, the ring fills and a primary disc grows over it with a check drawing itself, ten dots burst outward (700ms), the title morphs to doneTitle and Hide fades in.
Installation
Add this component with your preferred package manager.
pnpm dlx shadcn@4.21.5 add @cavemio/onboarding-checklistFirst install? Configure @cavemio once
Run npx shadcn@4.21.5 init if shadcn is not set up, then merge this entry into the registries field in your existing components.json. Keep your other settings and registries.
{
"registries": {
"@cavemio": "https://registry.cavemio.dev/r/cavemio-{name}.json"
}
}Where it’s used
SaaS “Get started” cards
The first five things a new customer should do, on the dashboard.
Developer platforms
Create an API key, install the SDK, make a first request.
Seller and creator onboarding
Add a product, connect payouts, publish a page.
Team setup
Invite teammates, connect integrations, finish the profile.
What it handles
- The next task is open — It shows what the task is, why it matters and the one button that does it.
- Actions run in place — onClick can return a promise. The button shows a spinner and a pending label, and a failure leaves the task open to try again.
- Progress is visible — A ring fills a step at a time and “2 of 5” rolls.
- Finished tasks can be revisited — Click any row to open it, done or not.
- Progress survives a reload — Pass done from your database, and mark tasks done as their actions land with onTaskComplete.
- A finish worth seeing — The list folds away, the ring becomes a check with a small burst, and the title reads “You’re all set”.
Usage
Interactive local fixture. Data and async results are simulated in the preview; the caller supplies application services.
import { OnboardingChecklist } from "@/components/onboarding-checklist";
<OnboardingChecklist
tasks={[
{ id: "menu", title: "Add your menu", description: "Flavours, sizes and prices.", action: { label: "Import menu", pendingLabel: "Importing", onClick: importMenu } },
{ id: "payments", title: "Connect payments", action: { label: "Connect", href: "/settings/payments" } },
]}
/>Props
| Prop | Type | Description |
|---|---|---|
| tasks | OnboardingTask[] | – · id, title, and any of description, done (controlled), and action { label, pendingLabel?, onClick? (return a promise to show progress), href? }. |
| title / doneTitle / doneDescription | string | "Get started" / "You’re all set" / … · The heading before and after, and the line shown once everything’s done. |
| onTaskComplete | (id) => void | – · Called when a task’s action resolves; mark it done here if you control done. |
| onDismiss | () => void | – · Shows Hide once everything is done. |
| defaultCollapsed | boolean | false · Start folded to the header. |
Accessibility & motion
- An ordered list of disclosure buttons, each with aria-expanded; done tasks say so to screen readers. Progress is announced politely ("3 of 5 done") and once more when all is done. - The action button stays focusable while it runs and is marked aria-busy; a rejected promise leaves the task open to try again. - Folded parts are inert, so the keyboard never lands inside them. - Installs Number roll and Text morph. With reduced motion, ticks, strikes and the finish change in place without the burst.
pnpm dlx shadcn@4.21.5 add @cavemio/onboarding-checklist