Skip to content
Back

Multi-step formPro

One decision at a time with a rolling step count, a progress bar, sliding steps and a submit button whose width follows its label.

oxyn add multi-step-form
Step 1 of 4
Name your workspace

You can change both later in Settings.

acme.app/
Lowercase letters and dashes
Step 1 of 4: Workspace
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • One decision at a time inside a card — a short setup, a request form an agent hands the user.
  • Less chrome than the stepper: a step count and a bar instead of a step list.

When not to use

  • A multi-step setup flow: use Stepper Form instead.
  • On or off for things that apply right away: use Switch instead.
  • A real checkbox with a label and second line, an indeterminate state for Select all, an error, a card row and a check that draws itself: use Checkbox instead.

Installation

Multi-step 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.

Terminal
oxyn add multi-step-form

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

First

Step 1 of 4.

Step 1 of 4
Name your workspace

You can change both later in Settings.

acme.app/
Lowercase letters and dashes
Step 1 of 4: Workspace
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Middle

Step 2 with values kept.

Step 2 of 4
Invite your team
Paste a list; comma or Enter adds
0/5
Step 2 of 4: Team
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Drafts

Save and resume (Oxyn plus).

Step 1 of 4
Name your workspace

You can change both later in Settings.

acme.app/
Lowercase letters and dashes
Step 1 of 4: Workspace
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

StepperForm

PropTypeDefaultDescription
stepsrequiredVec<Step>—Steps.
styleString"stepper"`stepper` · `minimal` · `vertical`.
initial_stepusizeDefault::default()First step shown.
submit_labelString"Finish"Last step's button.
submitting_labelString"Creating…"While submitting.
success_titleString"Workspace ready"Success heading.
latency_msu32900Simulated submit time (the host's promise).
failboolDefault::default()The submit fails once (demo of the error next to the button).
draftsboolDefault::default()Oxyn plus: Save draft.
initial_valuesVec<(String, String)>Default::default()Values to start with: `(name, value)`; lists are comma-separated.
on_step_changeEventHandler<usize>—Step changed.
on_completeEventHandler<Vec<(String, String)>>—Completed: every `(name, value)`.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterNext / submit
TabThrough the step's fields, then Back and Next

Accessibility

  • Each step is a fieldset with a legend; focus moves to the new step's first field.
  • A visually hidden polite line announces “Step 2 of 4”.
  • The success state is role=status.
From the spec

Each step is a fieldset with a legend; the step count is announced politely ("Step 2 of 4: Team") from a visually hidden status line. Success is role=status.

Motion & interaction

The step number rolls like an odometer; the progress bar eases to the new width; the step slides in the direction of travel; the submit button's width animates to fit its label.

Timing
TransitionDurationEasingReduced motion
Count roll200 msease.outswap
Bar360 msease.out1 ms
Step slide260 msease.out1 ms
Button width / labelox-snapspringinstant

Responsive behaviour

  • Below 420 px the header stacks and padding tightens.
Edge cases (spec)

Below 420 px the header stacks and padding tightens. One-step forms show no count. Long labels on the submit button wrap to two lines rather than overflow. Touch: 40 px buttons.

Notes for AI

  • Import StepperForm from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: StepperEl in oxyn_gpui.
  • Props to set first: steps.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI