Introducing a new way to review your PRs.

Read the announcement

frappe / frappe-ui

The all-in-one toolkit for modern frontends. High-quality components, app recipes and AI-ready docs.

View on GitHub

28 documents · Updated Nov 23, 2026

docs / experimental-stepper

Experimental stepper

The experimental Stepper shows a person or process moving through an ordered set of named stages. It supports guided flows such as setup wizards and progress views for multi-stage jobs, while the caller keeps control of the current step and renders its content.

Stepper role

The stepper is a progress display, not a content container or tab control. It receives ordered step data and one current value, then derives the visual state of every step so a workflow can show what is done, active, skipped, failed, or still ahead.

Use Stepper when step names help explain the flow. Use Progress when the only useful result is how far the work has moved. The stepper is exported from frappe-ui/experimental, so its API can change while the experimental design is refined. References: experimental/…/Stepper.vue• L34-81, experimental/…/index.ts• L1-11, spec/stepper.md• L6-25

Workflow data

Each step is a StepItem with a unique value and a user-facing label. Optional descriptions, trailing metadata, a skipped flag, and one level of child steps let the same model describe a form wizard or a job with smaller stages.

The caller owns this data and does not give each item a separate status. The stepper derives status from modelValue, completed, and the item-level skipped flag. Values must be unique across top-level steps and child steps so the current position is unambiguous.

ContractMeaning
StepValueA string or number used to identify a step.
stepsThe ordered StepItem[] rendered by the component.
modelValueThe current step value. It may identify a child step.
completedMarks the whole flow done and takes precedence over modelValue.
loadingMarks the current step as running.
failedMarks the current step as failed.

References: experimental/…/types.ts• L1-67 experimental/…/Stepper.vue• L46-77 spec/stepper.md• L27-80

Progress resolution

The stepper resolves state from the ordered leaf sequence. A leaf is a step without children or a child step; the sequence follows each parent and its children before moving to the next top-level step. This gives the caller one current position even when the display groups work under a parent.

When the current value is empty or does not match a step, all steps are upcoming. When it matches a parent, the first child becomes current. A parent reflects its children: it is complete when all children are complete or skipped, current while a child is current, failed when a child has failed, and upcoming otherwise.

The state rules are:

  • Steps before the current leaf are complete, unless their item is marked skipped.
  • The current leaf is current, or failed when failed is true.
  • Steps after the current leaf are upcoming.
  • completed marks all steps complete, while a flagged step remains skipped.

The following flow shows how caller state becomes the state displayed for each step.

flowchart LR
  A[steps and modelValue] --> B[ordered leaf sequence]
  B --> C{completed?}
  C -->|yes| D[all steps complete or skipped]
  C -->|no| E[find current leaf]
  E --> F[derive complete, current, failed, upcoming, or skipped]
  F --> G[horizontal or vertical display]

References: experimental/…/resolve.ts• L11-87 experimental/…/types.ts• L3-9 spec/stepper.md• L82-98

Horizontal layout

The default horizontal layout presents the flow as a segmented progress bar with one interval for each top-level step. Labels sit below the matching intervals, and an interval fills when its step is complete or skipped.

Horizontal mode does not show child steps. It is best for a compact overview where the top-level sequence matters more than the detail inside a stage. The size prop changes indicator and label scale, but edge and substeps apply only to the vertical layout.

References: experimental/…/StepperHorizontal.vue• L1-41 experimental/…/StepperHorizontal.vue• L74-90 spec/stepper.md• L129-133

Vertical layout

The vertical layout presents the flow as an ordered list with a rail between indicators. It can show descriptions, trailing metadata, and one level of child steps, which makes it suitable for guided forms and detailed run progress.

edge places the indicator rail at the start or end of the row. substeps="all" shows child steps under every parent; substeps="current" limits them to the current parent. Child indicators are smaller and do not carry top-level step numbers.

References: experimental/…/StepperVertical.vue• L1-127 experimental/…/StepperVertical.vue• L228-269 experimental/…/Stepper.api.md• L43-69

Indicators and states

Indicators turn the resolved state into a compact visual and spoken status. Unfinished top-level steps show their position number, while completed, failed, and skipped steps use state icons; a child step uses a dot for its current state instead of a number.

loading affects the current step only. Its outline shows motion while the circle stays still, and the motion stops when the user prefers reduced motion. failed changes the current step to a failed state and uses the failed visual treatment.

References: experimental/…/StepIndicator.vue• L1-34 experimental/…/StepIndicator.vue• L51-96 spec/stepper.md• L102-121

Backward navigation

The stepper can let a workflow return to finished work without taking ownership of navigation. With clickable, complete and skipped steps become buttons; clicking one emits update:modelValue with that step's value. The caller must update v-model and decide how to render the selected content.

Current and upcoming steps are not clickable. completed disables all step buttons because it takes precedence over the current value and would make a click ineffective.

References: experimental/…/Stepper.vue• L14-16 experimental/…/Stepper.vue• L79-81 experimental/…/StepperVertical.vue• L228-248 spec/stepper.md• L145-149

Slots and accessibility

Scoped slots let a caller replace the indicator, label, description, or trailing metadata without changing the step state model. Each slot receives the item, its index among siblings, and its resolved state.

The rendered structure is an ordered list with nested ordered lists for child steps. The current step has aria-current="step", and each indicator includes a hidden state word so the flow remains understandable without the icons. When navigation is enabled, finished steps are keyboard-accessible buttons.

References: experimental/…/Stepper.api.md• L79-107 experimental/…/Stepper.vue• L60-69 experimental/…/StepperVertical.vue• L1-9 spec/stepper.md• L135-173

Guided workflow use

In a guided workflow, the parent view supplies the step list and binds the current value to the stepper. The parent advances or revisits the value after the relevant content action, while the stepper keeps the progress display consistent with that value.

For a long-running process, the parent can keep the current stage selected, set loading while work runs, set failed when that stage fails, and set completed when the whole sequence finishes. A skipped item records that the process passed a stage without doing it.

References: experimental/…/Stepper.playground.vue• L5-32 experimental/…/Stepper.playground.vue• L76-86 spec/stepper.md• L6-24

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep StepValue uniqueness across parent and child items so current-step resolution and click events cannot target the wrong stage.
  • Keep horizontal progress tied to top-level steps, while vertical child rendering remains controlled by substeps.
  • Keep completed higher priority than modelValue and disable clickable controls when both are enabled.
  • Keep slot state and index contracts aligned with the resolved parent and child items.

Important failure modes

TriggerConsequenceGuard
modelValue does not match any stepEvery step appears upcoming.Use a value from the complete step tree.
A parent value is used for a step with childrenIts first child becomes current.Bind the value of the intended child for precise progress.
completed and clickable are both setNo step can be selected by click.Clear completed before allowing backward navigation.
Child steps are expected in horizontal modeOnly top-level steps appear.Use vertical when child progress must be visible.

Key files

FileWhy to read it
experimental/…/Stepper.vueShows the public component boundary, defaults, state resolution, and model update event.
experimental/…/types.tsDefines the step data, state, prop, event, and slot contracts.
experimental/…/resolve.tsExplains how current position, parent state, skipped steps, and completion become visible states.
experimental/…/StepperHorizontal.vueShows the segmented horizontal progress model.
experimental/…/StepperVertical.vueShows the detailed vertical list and child-step model.
experimental/…/Stepper.api.mdLists the public props, slots, and emitted event.
experimental/…/StepIndicator.vueShows the visual and spoken meaning of each state.