← All Components
<mth-stepper>
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
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>import '@methane-ui/ui/stepper';
import '@methane-ui/react';
export function Example() {
return <mth-stepper orientation="horizontal" active-step="0">Example</mth-stepper>;
}<script setup lang="ts">
import '@methane-ui/ui/stepper';
</script>
<template>
<mth-stepper orientation="horizontal" active-step="0">Example</mth-stepper>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/stepper';
import { MthStepperDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthStepperDirective],
template: `<mth-stepper orientation="horizontal" active-step="0">Example</mth-stepper>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/stepper';
import MthStepper from '@methane-ui/svelte/MthStepper.svelte';
</script>
<MthStepper orientation="horizontal" active-step="0">Example</MthStepper>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
label | label | string | "" | Accessible label for the stepper <nav> landmark. |
orientation | orientation | 'horizontal' | 'vertical' | "horizontal" | Layout and arrow navigation axis (horizontal or vertical). |
linear | linear | boolean | false | Prevents jumping forward past upcoming steps until prior steps are complete. |
activeStep | active-step | number | 0 | 0-based index of the currently active step. |
value | value | string | "" | Value string of the currently active step. |
steps | — | ReadonlyArray<unknown> | [] | Programmatic step definitions used when no <mth-step> children are slotted. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-change | { index: number; value: string } | Fired when a permitted step is activated. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowRight | ltr | horizontal step focused | moves focus to next enabled step |
| ArrowLeft | rtl | horizontal step focused | moves focus to next enabled step |
| ArrowDown | both | vertical step focused | moves focus to next enabled step |
| Home | both | step focused | moves focus to first enabled step |
| End | both | step focused | moves focus to last enabled step |
| Enter | both | step focused | activates step if permitted by linear mode |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 6 APG keyboard transitions across LTR/RTL. | mth-stepper.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(linear). | Conformance suite |
| i18n | Routes 2 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |