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 stepperrsx! {
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.
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add stepperuse 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
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
| Prop | Type | Default | Description |
|---|---|---|---|
stepperrequired | Stepper | — | Steps and current index. |
orientation | String | "horizontal" | `horizontal` · `vertical`. |
details | String | "all" | `all` · `current`. |
compact | bool | Default::default() | Markers only with a caption. |
label | String | "Progress" | Accessible name. |
complete_label | String | "All steps complete" | Shown when every step is complete. |
on_select | Option<EventHandler<usize>> | Default::default() | A completed step was chosen (makes them interactive). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| ← → ↑ ↓ | Move between reachable steps |
| HomeorEnd | First / current step |
| EnterorSpace | Select 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
FlowStepperfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
FlowStepperElinoxyn_gpui. - Props to set first:
stepper. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.