Onboarding
Four setup steps (business, plan, billing, review) with progress, a validation error and a creating state.
Install
Not exported from agentic-ds-kit. add copies the source into your app (components/patterns/onboarding/) with this contract beside it. You own the copy: replace the demo steps and options, add or drop steps, and keep the must lines.
Usage
What a copy keeps
The contract’s must lines: the kit look and accessibility. Ask before breaking one.
- Use kit components from agentic-ds-kit for anything the kit has; no local cousins (tables, dialogs, rows, rules, charts)
- Semantic tokens only (agentic-ds-kit/tokens.css); no raw hex, no primitive --color-* ramps
- At most one appearance="solid" mode="primary" Button per step: Continue on Business, Plan and Billing, and Confirm on Review
- Do not restyle kit components; change them through their props, slots, and tokens
- Progress is a kit ProgressSteps: vertical in the Stage steps column (SideNav compose parts), or horizontal in a header landmark (AppHeader) below --grid-breakpoint-md, where it compacts to Step n of m, a Progress bar and the next step; the step content is in <main>, labelled with the step number and name
- Back is a ghost Button; Save and exit is ghost and reachable on every step: in the footer at the start when wide, in the AppHeader at sm below md. Every step is required, so there is no Skip
- Wrap every labeled input in Field; a missing business name on Business shows the Field error, sets the Input's error, and moves focus to it
- Confirm on Review is enabled only when Business, Plan and Billing are all valid; an invalid step is marked error in ProgressSteps and shows the Field error on the invalid field
- While the account is being created, Confirm uses Button loading labelled "Creating account…", and Back and Save and exit are disabled
- Motion only through kit components: BlurCrossfade on the step heading (it honours reduced motion); do not wrap the form or the TileGroup in it
- Page layout uses kit layout classes (layout-shell, layout-shell--inset, layout-app, layout-content, layout-container-sm, layout-split) and grid / layout tokens; no hard-coded columns, gutters, max-widths or breakpoints
Defaults you can change
- Four steps: Business (name, country, currency, optional VAT), Plan (a kit TileGroup with the price in meta), Billing (email, payment terms, invoice prefix), Review (a kit ListView, one group per step with an Edit action, and the first invoice with its amount as value)
- Stage look: a steps column on the canvas with the brand and vertical ProgressSteps (Done steps show a short summary and go back on click), and the step on an inset card panel (layout-shell--inset) with Step N of 4 as the PageHeader eyebrow. Below --grid-breakpoint-md a reduced AppHeader with the brand, horizontal ProgressSteps and Save and exit. No dense app nav
- The step column is layout-container-sm, centred on the page; the footer bar holds Save and exit (start, wide only), Back and the primary (end); below md Back sits at the start
- Enter submits the step (⏎ on Continue); onConfirm may return a promise to hold the submitting state, and onFinish runs after it resolves
- Confirm has a Check icon; Edit on a Review row goes back to that step
Built from
Related
- Component
AppHeader
Product top chrome: brand mark on the start, centered kit Input search, trailing actions.
- Component
Card
Framed tile with optional header, body, and footer actions.
- Component
Field
One labeled control with optional hint and an error or success message.
- Component
ListView
A list of records, one row each: primary and optional secondary line, leading avatar or icon, trailing value, badge, actions, or chevron.