Onboarding checklist Pro
OnboardingChecklist is the Get started card of a new account, as in Stripe, Notion and Linear: a ring that fills as tasks are done, the next task highlighted with its button, finished ones checked and struck through, and confetti when the last one lands. It folds down to its header and can be dismissed.
You own the tasks and their done: the checklist reflects what's true in your app, so a task done elsewhere (an invite sent from Settings) checks itself.
import { OnboardingChecklist } from '@patine-ui/pro';
<OnboardingChecklist title="Get started with Acme" items={TASKS.map((t) => ({ ...t, done: done.includes(t.id), onPress: () => setDone((d) => [...d, t.id]) }))} onDismiss={() => setVisible(false)} style={{ maxWidth: 420 }} />
Press each task's button to see the ring fill, and the card celebrate when the last one is done.
Example: open an online store
A new shop owner's home screen: each step opens the screen that does it, and here it finishes after a moment as if the owner did it there. When all four are done the checklist celebrates.
<VStack gap="sm" style={{ width: '100%', maxWidth: 440 }}> <OnboardingChecklist title="Open Juniper & Co." description="Your store goes live when these are done." items={STEPS.map((s) => ({ ...s, done: done.includes(s.id), onPress: () => finish(s.id) }))} /> {working ? <Text size="sm" color="textSecondary">Opening {STEPS.find((s) => s.id === working)?.title.toLowerCase()}…</Text> : null} </VStack>
In a sidebar or a home screen
It fits a 300-point sidebar and a phone's home screen alike. Start it folded with defaultOpen={false} where space is tight; the header still shows the ring and how many are left.
<OnboardingChecklist defaultOpen={false} celebrate={false} items={[ { id: 'a', title: 'Add a payment method', done: true }, { id: 'b', title: 'Verify your business', done: true }, { id: 'c', title: 'Create your first product' }, ]} style={{ maxWidth: 320 }} />
Accessibility
- Each task is a checkbox with its state, read with its description.
- The header reads "Get started, 2 of 5 done" and folds the list; the close button reads "Dismiss".
- The check pops and the ring fills; with reduce motion on, they're shown at once and no confetti flies.
Props
| Prop | Type | Default |
|---|---|---|
items | { id, title, description?, done?, actionLabel?, onPress? }[] | |
title | string | 'Get started' |
description | string | "3 steps left" |
defaultOpen | boolean | true |
onDismiss | () => void: shows the close button | |
celebrate | boolean: confetti on the last task | true |
style | ViewStyle |
Related
- Product tour: the walk-through before the tasks.
- Motion effects: the
Confettiit throws. - Progress: a plain bar, free.