Stepper FormPro
A multi-step setup flow: steps that fill and check off, sliding steps, inline validation, chip and plan fields, a review with Edit links and a success state.
oxyn add stepper-formThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Onboarding and setup: name a workspace, invite the team, pick a plan, review, create.
- The user wants to know where they are, fix mistakes in place and go back without losing anything.
When not to use
- One decision at a time with a rolling step count, a progress bar, sliding steps and a submit button whose width follows its label: use Multi-step form instead.
- Several values in one field as chips: use Tag Input instead.
- On or off for things that apply right away: use Switch instead.
Installation
Stepper Form is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add stepper-formUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Stepper
Numbered steps.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Review
At the review.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Vertical
A vertical rail (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Conditional
A step that shows only for one plan (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Error
The submit fails next to the button.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
StepperForm
| Prop | Type | Default | Description |
|---|---|---|---|
stepsrequired | Vec<Step> | — | Steps. |
style | String | "stepper" | `stepper` · `minimal` · `vertical`. |
initial_step | usize | Default::default() | First step shown. |
submit_label | String | "Finish" | Last step's button. |
submitting_label | String | "Creating…" | While submitting. |
success_title | String | "Workspace ready" | Success heading. |
latency_ms | u32 | 900 | Simulated submit time (the host's promise). |
fail | bool | Default::default() | The submit fails once (demo of the error next to the button). |
drafts | bool | Default::default() | Oxyn plus: Save draft. |
initial_values | Vec<(String, String)> | Default::default() | Values to start with: `(name, value)`; lists are comma-separated. |
on_step_change | EventHandler<usize> | — | Step changed. |
on_complete | EventHandler<Vec<(String, String)>> | — | Completed: every `(name, value)`. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| ↵ | Continue (in a chip field: add the entry first) |
| Tab | Fields, then Back and Continue |
| ←or→ | In the plan cards: move and select; ↵ picks and continues |
| or/ ⌫ | In a chip field: comma adds, Backspace removes the last chip |
Accessibility
- The steps are an ordered list with aria-current=step; finished steps are buttons that jump back.
- Below 420 px the list stays for screen readers while “Step 2 of 4” shows.
- After a failed Continue the first invalid field shakes; errors are announced politely.
- Continue looks dimmed while invalid but still answers, so everyone hears what's missing.
From the spec
The steps are an ordered list with aria-current=step; finished steps are buttons. Each step is a fieldset with a legend. Errors are linked to fields and announced ("2 fields need attention"); Continue stays operable while dimmed so the reason is always heard. Submitting and success go to a status region.
Motion & interaction
Steps fill and check off along the top. The card slides in from the side you're heading to and its height animates. The primary button's label crossfades and its width follows (Continue → Finish → Creating…). The first invalid field shakes once.
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Step slide | 260 ms, 20 px | ease.out | 1 ms |
| Card height | 280 ms | ease.out | instant |
| Step fill / tick | 260 ms draw | ease.out | drawn |
| Field shake | 360 ms | damped | none |
| Label swap | ox-base | ease.out | swap |
| Success check | 320 ms pop | ease.out | instant |
Responsive behaviour
- Up to 520 px wide, down to 320 px; plan cards stack and review rows wrap below 420 px.
- Touch: 16 px fields and 40 px buttons.
Edge cases (spec)
Below 420 px the step list collapses to "Step 2 of 4 · Team" (kept for screen readers), plan cards stack and review rows wrap. Optional fields skip the required check. Values survive Back and Edit. Very long values wrap in review. Touch: 16 px fields and 40 px buttons.
Notes for AI
- Import
StepperFormfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
StepperElinoxyn_gpui. - Props to set first:
steps. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.