Skip to content
Focsd homeFocsd homeFocsd
Forms

Stepper

Shows progress through a multi-step flow.

  • Tag: focsd-stepper
  • Pattern: List with current step
  • Category: Navigation

Example

Cart Shipping Payment
HTML
<focsd-stepper label="Checkout progress" current="1">
<focsd-step>Cart</focsd-step>
<focsd-step>Shipping</focsd-step>
<focsd-step>Payment</focsd-step>
</focsd-stepper>

Usage

Import the module once, then use the tag like any HTML element. Every framework below renders the same element; see Frameworks for setup.

<script type="module">
import '@focsd-dev/components/focsd-stepper.js';
</script>
<focsd-stepper label="Checkout progress" current="1">…</focsd-stepper>

API

Attributes

AttributePropertyTypeDefault
labellabelstring—
currentcurrentnumber0

Slots

SlotDescription
(default)Default content.

CSS parts

Style the inside of the component with ::part(), for example focsd-stepper::part(steps).

PartDescription
stepsThe steps element.

Accessibility

  • A role="list" of steps, named by label; the current step has aria-current="step".
  • Each step carries visually hidden status text ("Completed", "Current step", "Not started"), so state is never shown by color alone.