Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-stepper>

@methane-ui/ui~9.0 KB brotli (cold + Lit)~2.6 KB marginal

Multi-step progress and wizard navigation supporting horizontal/vertical orientation, linear step enforcement, declarative <mth-step> children or .steps array, and roving focus.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-stepper> (@methane-ui/ui)
Ready · interact with <mth-stepper>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/stepper"></script>
<mth-stepper orientation="horizontal" active-step="0">Example</mth-stepper>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
labellabelstring""Accessible label for the stepper <nav> landmark.
orientationorientation'horizontal' | 'vertical'"horizontal"Layout and arrow navigation axis (horizontal or vertical).
linearlinearbooleanfalsePrevents jumping forward past upcoming steps until prior steps are complete.
activeStepactive-stepnumber00-based index of the currently active step.
valuevaluestring""Value string of the currently active step.
steps—ReadonlyArray<unknown>[]Programmatic step definitions used when no <mth-step> children are slotted.

Events

EventDetail TypeDescription
mth-change{ index: number; value: string }Fired when a permitted step is activated.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowRightltrhorizontal step focusedmoves focus to next enabled step
ArrowLeftrtlhorizontal step focusedmoves focus to next enabled step
ArrowDownbothvertical step focusedmoves focus to next enabled step
Homebothstep focusedmoves focus to first enabled step
Endbothstep focusedmoves focus to last enabled step
Enterbothstep focusedactivates step if permitted by linear mode

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 6 APG keyboard transitions across LTR/RTL.mth-stepper.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(linear).Conformance suite
i18nRoutes 2 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test