Stepper
Shows progress through a multi-step flow.
Example
<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>import { Stepper } from '@focsd-dev/react';
export function Example() { return <Stepper label="Checkout progress" current="1">…</Stepper>;}<script setup>import '@focsd-dev/components/focsd-stepper.js';</script>
<template> <focsd-stepper label="Checkout progress" current="1">…</focsd-stepper></template>// Add CUSTOM_ELEMENTS_SCHEMA to the component's schemas, then:import '@focsd-dev/components/focsd-stepper.js';
// template<focsd-stepper label="Checkout progress" current="1">…</focsd-stepper><script> import '@focsd-dev/components/focsd-stepper.js';</script>
<focsd-stepper label="Checkout progress" current="1">…</focsd-stepper>API
Attributes
| Attribute | Property | Type | Default |
|---|---|---|---|
label | label | string | — |
current | current | number | 0 |
Slots
| Slot | Description |
|---|---|
(default) | Default content. |
CSS parts
Style the inside of the component with ::part(), for example focsd-stepper::part(steps).
| Part | Description |
|---|---|
steps | The steps element. |
Accessibility
- A
role="list"of steps, named bylabel; the current step hasaria-current="step". - Each step carries visually hidden status text ("Completed", "Current step", "Not started"), so state is never shown by color alone.
Ask the docs
Hi, what are you building?
Ask about any component, theming, forms or frameworks. I answer with the right component, a snippet and a link to its docs.