@objectifthunes/whiteboard
PAGE SHELLS

WizardPage

A multi-step flow. Progress, a step rail, the step in a card, and a footer where forward is yours to gate and back is free.


PREVIEW
Setting up My Whiteboard
Step 1 of 333%
  1. WorkspaceName and region
  2. Invite teamOptional
  3. Review
Name your workspace

Continue stays disabled until this has a value.

SOURCE
import { WizardPage } from '@objectifthunes/whiteboard'

<WizardPage
  steps={STEPS}
  current={step}
  onStepChange={setStep}          {/* only ever offers finished steps */}
  onBack={goBack}
  onNext={goNext}
  nextDisabled={!name.trim()}     {/* the caller owns validation */}
  eyebrow="Setting up My Whiteboard"
  actions={<ButtonLink href="/app">Skip for now</ButtonLink>}
>
  {stepBody}
</WizardPage>
NOTES

Forward navigation stays with you through onNext andnextDisabled, because only the form knows whether the step validates. The shell owns the rhythm and the fact that you can click back but never forward, which is the part every wizard re-implements and gets subtly wrong.

Keep the reason a step is blocked visible in the body. Greying the button without saying why is how people get stuck.

Pass footer to replace the back and continue row entirely, which is what the last step usually wants.