Skip to content
ZikZuk UI

OnboardingView

Stripe OnboardingView

A setup with dependent steps on its own page: the task list stays on the left (sticky, with progress), the selected task opens on the right with its title, its form and one primary action. The pane slides in when the task changes, unsaved work asks before it is thrown away, and on phones the task opens full screen behind “← Tasks”. Pair it with useSetupFlow, which derives every task's status from your record.

pnpm add @zikzuk/ui
import { OnboardingView, useSetupFlow, useTaskUrl } from "@zikzuk/ui";

Connect an SMS provider

Statuses come from useSetupFlow; saving marks the row complete and opens the next task.

Credentials

Paste the API key from the provider's panel.

When to use

  • Later steps depend on earlier answers, something must be verified before going live, or people leave and come back.
  • Connecting a provider (credentials → test → go live), business verification, onboarding an account.
  • Keep the selected task in the URL with useTaskUrl so reload and Back reopen it.

Not for

  • A form someone fills in one sitting with no checks — keep it a plain form.
  • A chain of dialogs, or one long form in a dialog.

Props

PropTypeDescription
tasksOnboardingTask[]The tasks in order — usually useSetupFlow(...).tasks. Rows need no handlers.
selectedstringThe task on screen (controlled). Without it the view keeps its own.
onSelectTask(key: string) => voidA row was pressed (after any “Discard changes?”).
url{ value, set }Keep the selected task in the URL: useTaskUrl() or your router's adapter.
titleReactNodeThe selected task's title.
descriptionReactNodeOne line under the title.
childrenReactNodeThe task's form.
onBack() => voidBack (outline, left). Asks first while dirty.
primaryActionReactNodeThe one primary button: “Save and continue”, or the outcome on the last task.
footerReactNodeA footer of your own instead of Back + primary.
completedbooleanEvery task is complete; onComplete runs once.
onComplete() => voidGo to the record's own page.
pendingbooleanA skeleton of both columns.
errorReactNodeLoading failed: a critical Banner with Try again (onRetry).
dirtybooleanUnsaved changes: switching task or going back asks first.
progressLabelstring
Default "Setup progress"
The task list's progress label.