Usage
import { SaasOnboarding } from './SaasOnboarding.jsx'
// Without onToggle a step is "saved" after a short wait. Wire it to your API:
<SaasOnboarding
locale="en"
steps={steps} // [{ id, title, text, done, minutes?, action? }]
loading={!steps}
error={stepsError}
onRetry={reloadSteps}
onToggle={async (id, done) => (await saveStep(id, done)).ok}
onAction={(id) => router.push('/setup/' + id)}
onDismiss={() => hideChecklist()}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | Language of the built-in text and sample steps. |
steps | Array<{ id, title, text, done, minutes?, action? }> | sample steps | The steps in order. `minutes` adds up to the time left; `action` labels a button that starts the step. An empty array shows the empty state. |
loading | boolean | false | Shows the skeleton of the checklist while it loads. |
error | boolean | string | false | Shows the error banner with a retry button; a string replaces its sentence. |
onToggle | (id, done) => Promise<boolean | void> | — | Saves a tick or an untick. Resolve false to leave the step as it was. |
onAction / onDismiss / onRetry | (id) => void / () => void / () => void | — | A step’s start button was pressed; the finished checklist was hidden; the error banner’s retry was pressed. |
labels | object | — | Replaces any built-in text (keys as in copy.js). |
className | string | — | Added to the root section. |
Add it to your project
Copy the prompt into Codex or Claude Code. The agent reads the published source, shows you what it will write and adds the block together with the components it is built from.
SaasOnboarding.jsxsaas-onboarding.csscopy.jskit.jsxkit.cssui/base-button/ui/empty-state/ui/alert-banner/ui/checkbox/ui/progress-ring/ui/skeleton-shimmer/tokens.cssREADME.md
The block, its stylesheet and text, the shared kit, the components it uses and tokens.css install together into one folder.