Build a Multi-Step Onboarding Wizard with Stepper and Inline Validation

A four-step onboarding wizard in one HTML file, with a clickable stepper, progress bar, inline validation, a review screen, and keyboard and swipe navigation.

You getone complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
Act as a senior product designer who writes clean, accessible front-end code. Build Lanternly Setup, a four-step onboarding wizard for a fictional team workspace app. Step 1, About you: full name, work email and a role select. Step 2, Your workspace: workspace name, an editable web-address slug generated from the name, and team size as radio cards. Step 3, How you'll use it: choose one to three use-case chips plus a weekly digest switch. Step 4, Review: a summary with an Edit button for each section. Finish on a success screen with a Start over button.
Rules:
1. Use no form element and no submission. Validate each step in JavaScript when the user presses Continue. Once a field shows an error, re-check it as the user types. Link each error to its field with aria-describedby and aria-invalid, and move focus to the first invalid field.
2. Show a numbered stepper with labels, checkmarks on finished steps and aria-current on the active step. Add a progress bar with Step 2 of 4 text. Steps already reached are clickable. Later steps are locked.
3. Enter continues, Alt+Left goes back and Alt+Right continues. Swiping right on touch goes back. Move focus to each step heading and announce the change in a polite live region.
4. Use a warm off-white background, a white card, dark ink text and one teal accent, with red only for errors. Use system fonts.
5. Add a short slide between steps and turn it off under prefers-reduced-motion. The layout fits 360 to 1280px.
Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen

Example: Lanternly Setup, a four-step workspace onboarding wizard.

Fill in each step and press Continue or Enter. Try leaving the email blank or typing a bad slug: errors appear under the field, focus jumps to the first problem, and messages clear as you fix them. Click finished steps in the stepper, press Alt + ← to go back, or swipe right on a phone. The Review step has Edit buttons for each section, and Create workspace shows a success screen.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Naming every step, field and error rule up front gives the model the whole state flow, so validation and navigation work on the first run.
  • Banning the form element keeps the wizard clear of sandbox submit blocks and forces explicit per-step validation logic.
  • Asking for focus management, aria-invalid and a live region makes keyboard and screen-reader support part of the build from the start.

Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as onboarding.html and open it in any browser, or run it in the chat's preview or canvas panel.

Common edits

  • Swap the fields and copy for your own product, such as a fitness app profile, a store checkout or event registration, and keep the same four-step flow.
  • Change the teal accent and the radius values to match your brand, or add a fifth step such as Invite teammates with email validation.

Prompt details

By
Prompts-GPT editors
Published
How prompts are written and checked

Did this prompt work?

Keep exploring

More in Design