A dark onboarding wizard for Bootstrap 6 that walks a new user through workspace setup in four short steps and ends on a finish screen that sums up their choices. It fits SaaS products and team tools; a vertical Bootstrap 6 stepper in the sidebar shows progress.
How it works
The root .obw-root has data-bs-theme="dark" and a data-step attribute. The left .obw-side holds a .stepper whose items get .active as the user moves on; the current one also gets aria-current="step" and an accent title. On the right, each step is a <fieldset class="obw-panel"> with a data-obw-panel number.
- Workspace: a name field and an address field inside an
.input-group. Theslugify()helper fills the address from the name until the user edits it by hand. The.obw-swatchradios set--obw-accenton the root, so the whole wizard changes color live. - Goal: four tiles built as Bootstrap 6 toggle buttons (
label.btn-checkwith the radio inside). One choice is required. - Interests:
button.chiptoggles with.activeandaria-pressed;.obw-pickedcounts them, and at least one is required. - Team: a Bootstrap 6 chip input (
data-bs-chips, comma separator, create on blur). Anadd.bs.chipslistener callspreventDefault()for anything that is not an email address, andchange.bs.chipsupdates the counter.Chips.getOrCreateInstance(...).getValues()reads the final list. A "Skip for now" button finishes without invites.
The Continue button is the form's submit button. validate() checks only the current step, then the script shows the next panel and moves focus into it. Finishing shows a spinner, fills .obw-summary and focuses .obw-finish.
Customization
--obw-accentand--obw-accent-inkon.obw-root: change the default accent and the text color on accent buttons; the overridden--bs-primary-*tokens follow it.--obw-bg,--obw-panel,--obw-sideand--obw-lineon.obw-root: adjust the dark surfaces and borders.- Add another
.obw-swatchlabel with its own--obw-swvalue to offer more accent colors. MAX_INVITESandEMAILat the top ofscript.js: change the invite limit and the email rule.- Add or remove
button.chipitems in.obw-chipsto offer other templates; mark defaults with.activeandaria-pressed="true". - Replace the
setTimeoutinfinish()with afetch()call that creates the workspace.
Use cases
- SaaS first-run setup: a vertical stepper guides new users through workspace setup
- Team tools: goal tiles and template chips let people pick how they will use the product
- Collaboration apps: an email invite chip input adds teammates before finishing
- Product onboarding: a finish screen confirms the setup is complete
Accessibility
Every step is a <fieldset> with its question as the <legend>. Swatches and goal tiles are native radios, so arrow keys work, and focus rings are drawn on the visible tile or swatch. Template chips are buttons with aria-pressed. Focus moves to the first control of each step and to the finish panel at the end.
Bootstrap 6 notes
Bootstrap 5 had no stepper or chip input; Bootstrap 6 adds .stepper, .chip and the Chips plugin. Toggle buttons now put the input inside label.btn-check btn-outline theme-primary, .form-select is replaced by .form-control on the select, and responsive helpers use prefixes such as sm:d-flex. Built on Bootstrap 6.0.0-alpha.1, so APIs may still change.