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
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
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
Did this prompt work?
Keep exploring
More like this
Build a Responsive Navigation Bar With Mega Menu and Mobile Drawer in HTML
A complete single-file site header with a hover, click and arrow-key mega menu on desktop and an animated hamburger drawer with accordions on small screens.
Build a Responsive Three-Tier Pricing Section with Monthly/Yearly Toggle
A single HTML file with three pricing cards, a working billing switch that recalculates prices, a highlighted recommended plan and accessible feature checkmarks.
Build an Accessible Modal, Toast and Tooltip Showcase in One HTML File
You get a single HTML page with a modal dialog, toast notifications and tooltips. All three use focus trapping, Escape handling, correct ARIA roles and live-region announcements.
Build a Light/Dark Mode Toggle Demo Page with Smooth Theme Switching
A single HTML page with a polished light/dark theme switch built on CSS custom properties that defaults to the system theme, honors reduced motion, and uses no storage.
Build a Playful Animated 404 Error Page with SVG Art and Site Search
A complete single-file 404 page with an original animated hot-air balloon SVG, a live-filtering search box and helpful recovery links that respect reduced motion.
Design an Accessible Settings Page with Toggles, Segmented Controls and Sliders
A ready-to-paste prompt that builds a polished single-file settings page with custom accessible toggles, segmented controls and sliders that update a live reading preview.
- Build a Button and Form Field States Reference Sheet in a Single HTML File
- Build a Color Blindness Simulator That Previews a Palette on a Dashboard Card
- Build a Drag-to-Arrange Brand Mood Board with Color, Texture and Type Tiles
- Build a Draggable Color Harmony Wheel With Live UI Preview in One HTML File
- Build a SaaS Landing Page Hero with a CSS-Drawn Product Mockup
- Build a Sortable, Filterable Data Table with Pagination in One HTML File