Skip to content

Stepper

Where a person is in a multi-step flow: numbers morph into checks or alerts, connectors fill, descriptions for every step or just the current one, compact markers with a caption, and arrow-key selection of completed steps.

oxyn add stepper
MCP
Dioxus
rsx! {
    FlowStepper {
        stepper: Stepper { steps, current },
    }
}

Rendered from Rust at build time · goes live when visible

When to use

  • Where a person is in a multi-step flow and what is done.
  • Horizontal or vertical; numbers morph into checks or an alert; connectors fill one after another; descriptions for all steps or only the current one (errors always show); optional steps; compact markers with a caption (“Step 3 of 4 · Billing”), automatic below 30 rem; completed steps are selectable with arrow keys when on_select is set.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • Several open requests in one card: use Approval pager instead.
  • An agent's question in its own card above the composer: use Decision Card instead.

Installation

Stepper is free and MIT. The oxyn CLI copies its code, and the components it needs, into src/oxyn/ of your Dioxus or GPUI project, so it is yours to change.

Terminal
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add stepper
Rust
use crate::oxyn::{FlowStepper, STATUS_INDICATOR_CSS};

Rather depend on the crate? cargo add oxyn-dioxus oxyn-core --git https://github.com/ismailqureshi72/Oxyn, then use oxyn_dioxus::{FlowStepper, STATUS_INDICATOR_CSS};

Usage

Dioxus · rust
rsx! {
    FlowStepper {
        stepper: Stepper { steps, current },
    }
}

Examples

Horizontal

Step 3 of 4.

Code
rsx! {
    FlowStepper {
        stepper: Stepper { steps, current },
    }
}

Vertical

Vertical with current-only descriptions.

Code
rsx! {
    FlowStepper {
        stepper: Stepper { steps, current },
        orientation: "vertical",
        details: "current",
    }
}

Compact

Markers and a caption.

Code
rsx! {
    FlowStepper {
        stepper: Stepper { steps, current },
        compact: true,
    }
}

Error

Billing failed.

Code
rsx! {
    FlowStepper {
        stepper: Stepper { steps, current },
    }
}

Complete

All steps complete.

Code
rsx! {
    FlowStepper {
        stepper: Stepper { steps, current },
    }
}

API reference

FlowStepper

PropTypeDefaultDescription
stepperrequiredStepper—Steps and current index.
orientationString"horizontal"`horizontal` · `vertical`.
detailsString"all"`all` · `current`.
compactboolDefault::default()Markers only with a caption.
labelString"Progress"Accessible name.
complete_labelString"All steps complete"Shown when every step is complete.
on_selectOption<EventHandler<usize>>Default::default()A completed step was chosen (makes them interactive).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
← → ↑ ↓Move between reachable steps
HomeorEndFirst / current step
EnterorSpaceSelect a completed step

Accessibility

  • nav with an accessible name; the current step has aria-current=step.
  • All complete is announced in a status region.
From the spec
  • nav with an accessible name; aria-current=step on the current item.
  • Completion announced in a status region.

Motion & interaction

Timing
  • Connectors fill over 350 ms; the current marker gets a 4 px ring.
  • Reduced motion: no entrance rise, no shimmer (static muted text), rings and bars jump to their value.

Responsive behaviour

  • Horizontal steppers hide their text below 30 rem (container query) and keep the markers.
Edge cases (spec)
  • Container query: text hides below 30 rem in horizontal mode.

Notes for AI

  • Import FlowStepper from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: FlowStepperEl in oxyn_gpui.
  • Props to set first: stepper.
  • 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