Steps
Guides users through a multi-step workflow with linear and non-linear navigation.
There is no dedicated WAI-ARIA APG pattern for Steps. Steps uses a semantic ordered list (<ol> in Steps.List and <li> in Steps.Item), sets aria-current="step" on the active step item, and hides decorative indicators and separators with aria-hidden="true".
import { component$, useStyles$ } from '@builder.io/qwik';
import { Steps } from '@leve-ui/steps';
import styles from './default.css?inline';
export default component$(() => {
useStyles$(styles);
return (
<Steps.Root count={3} class="steps-default">
<Steps.List class="steps-default-list">
<Steps.Item index={0} class="steps-default-item">
<Steps.Trigger class="steps-default-trigger">
<Steps.Indicator class="steps-default-indicator">1</Steps.Indicator>
<span>Account</span>
</Steps.Trigger>
<Steps.Separator class="steps-default-separator" />
</Steps.Item>
<Steps.Item index={1} class="steps-default-item">
<Steps.Trigger class="steps-default-trigger">
<Steps.Indicator class="steps-default-indicator">2</Steps.Indicator>
<span>Profile</span>
</Steps.Trigger>
<Steps.Separator class="steps-default-separator" />
</Steps.Item>
<Steps.Item index={2} class="steps-default-item">
<Steps.Trigger class="steps-default-trigger">
<Steps.Indicator class="steps-default-indicator">3</Steps.Indicator>
<span>Review</span>
</Steps.Trigger>
</Steps.Item>
</Steps.List>
<Steps.Content index={0} class="steps-default-content">
Enter your email and password to create an account.
</Steps.Content>
<Steps.Content index={1} class="steps-default-content">
Add your display name and profile details.
</Steps.Content>
<Steps.Content index={2} class="steps-default-content">
Confirm your information before submitting.
</Steps.Content>
<div class="steps-default-actions">
<Steps.PrevTrigger class="steps-default-nav">Previous</Steps.PrevTrigger>
<Steps.NextTrigger class="steps-default-nav">Next</Steps.NextTrigger>
</div>
</Steps.Root>
);
});.steps-default {
width: 440px;
max-width: 100%;
font-family: inherit;
color: light-dark(#0f172a, #ffffff);
}
.steps-default-list {
display: flex;
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
.steps-default-item {
display: flex;
align-items: center;
flex: 1;
}
.steps-default-item:last-child {
flex: none;
}
.steps-default-trigger {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0.375rem;
border: none;
border-radius: 6px;
background: transparent;
color: light-dark(#475569, #c9ddf0);
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
white-space: nowrap;
cursor: pointer;
}
.steps-default-trigger[data-state="current"],
.steps-default-trigger[data-state="complete"] {
color: light-dark(#0f172a, #ffffff);
}
.steps-default-trigger:hover:not([data-disabled]) {
background: light-dark(#f1f5f9, #ffffff14);
}
.steps-default-trigger:focus-visible,
.steps-default-nav:focus-visible {
outline: 2px solid #009dfd;
outline-offset: 2px;
}
.steps-default-indicator {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.75rem;
height: 1.75rem;
border-radius: 9999px;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
background: light-dark(#ffffff, #1b2045);
color: light-dark(#475569, #c9ddf0);
font-size: 0.75rem;
font-weight: 600;
flex-shrink: 0;
}
/* Active step indicator */
.steps-default-indicator[data-state="current"] {
border-color: #009dfd;
background: #009dfd;
color: #ffffff;
}
/* Completed step indicator */
.steps-default-indicator[data-state="complete"] {
border-color: #009dfd;
background: light-dark(#f1f5f9, #ffffff14);
color: light-dark(#006ce9, #4cb8ff);
}
.steps-default-separator {
flex: 1;
height: 2px;
margin: 0 0.75rem;
background: light-dark(#e2e8f0, #ffffff1f);
}
.steps-default-separator[data-state="complete"] {
background: #009dfd;
}
.steps-default-content {
margin-top: 1rem;
padding: 1rem;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
border-radius: 6px;
background: light-dark(#ffffff, #1b2045);
font-size: 0.875rem;
line-height: 1.5;
color: light-dark(#475569, #c9ddf0);
}
.steps-default-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-top: 0.75rem;
}
.steps-default-nav {
padding: 0.375rem 0.75rem;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
border-radius: 6px;
background: light-dark(#ffffff, #1b2045);
color: light-dark(#0f172a, #ffffff);
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
}
.steps-default-nav:hover:not([data-disabled]) {
background: light-dark(#f1f5f9, #ffffff14);
}
.steps-default-nav[data-disabled] {
opacity: 0.5;
cursor: not-allowed;
}Installation#
Install the individual package, or use @leve-ui/core to get every component at once:
pnpm add @leve-ui/stepsnpm install @leve-ui/stepsyarn add @leve-ui/stepsbun add @leve-ui/stepspnpm add @leve-ui/corenpm install @leve-ui/coreyarn add @leve-ui/corebun add @leve-ui/coreAnatomy#
import { Steps } from '@leve-ui/steps'; // or '@leve-ui/core'
<Steps.Root count={3}>
<Steps.List>
<Steps.Item index={0}>
<Steps.Trigger>
<Steps.Indicator>1</Steps.Indicator>
<span>Account</span>
</Steps.Trigger>
<Steps.Separator />
</Steps.Item>
</Steps.List>
<Steps.Content index={0}>Step content</Steps.Content>
<Steps.PrevTrigger>Previous</Steps.PrevTrigger>
<Steps.NextTrigger>Next</Steps.NextTrigger>
</Steps.Root>
| Part | Element | Description |
|---|---|---|
Steps.Root | <div> | Wraps the parts and manages the active step, total count, linear mode, and orientation. |
Steps.List | <ol> | Ordered list container for step items. |
Steps.Item | <li> | Represents a single step at index and sets aria-current="step" when active. |
Steps.Trigger | <button> | Activates its parent step when clicked. Automatically disabled when blocked by linear mode or item disabled. |
Steps.Indicator | <span> | Decorative visual badge (such as a step number or icon), hidden from assistive technologies. |
Steps.Separator | <div> | Decorative connector line inside a step item, hidden from assistive technologies. |
Steps.Content | <div> | Content panel for a given index. Always rendered, with hidden applied when inactive. |
Steps.PrevTrigger | <button> | Navigates to the previous step. Automatically disabled on the first step. |
Steps.NextTrigger | <button> | Navigates to the next step. Automatically disabled on the last step. |
Examples#
Linear#
Pass linear on Steps.Root to prevent jumping ahead to upcoming steps via Steps.Trigger, while still allowing navigation back to completed steps.
import { component$, useStyles$ } from '@builder.io/qwik';
import { Steps } from '@leve-ui/steps';
import styles from './linear.css?inline';
export default component$(() => {
useStyles$(styles);
return (
<Steps.Root count={3} linear class="steps-linear">
<Steps.List class="steps-linear-list">
<Steps.Item index={0} class="steps-linear-item">
<Steps.Trigger class="steps-linear-trigger">
<Steps.Indicator class="steps-linear-indicator">1</Steps.Indicator>
<span>Shipping</span>
</Steps.Trigger>
<Steps.Separator class="steps-linear-separator" />
</Steps.Item>
<Steps.Item index={1} class="steps-linear-item">
<Steps.Trigger class="steps-linear-trigger">
<Steps.Indicator class="steps-linear-indicator">2</Steps.Indicator>
<span>Payment</span>
</Steps.Trigger>
<Steps.Separator class="steps-linear-separator" />
</Steps.Item>
<Steps.Item index={2} class="steps-linear-item">
<Steps.Trigger class="steps-linear-trigger">
<Steps.Indicator class="steps-linear-indicator">3</Steps.Indicator>
<span>Confirmation</span>
</Steps.Trigger>
</Steps.Item>
</Steps.List>
<Steps.Content index={0} class="steps-linear-content">
Choose your shipping address and delivery speed.
</Steps.Content>
<Steps.Content index={1} class="steps-linear-content">
Enter your payment method and billing details.
</Steps.Content>
<Steps.Content index={2} class="steps-linear-content">
Review your order details and place your order.
</Steps.Content>
<div class="steps-linear-actions">
<Steps.PrevTrigger class="steps-linear-nav">Previous</Steps.PrevTrigger>
<Steps.NextTrigger class="steps-linear-nav">Next</Steps.NextTrigger>
</div>
</Steps.Root>
);
});.steps-linear {
width: 440px;
max-width: 100%;
font-family: inherit;
color: light-dark(#0f172a, #ffffff);
}
.steps-linear-list {
display: flex;
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
.steps-linear-item {
display: flex;
align-items: center;
flex: 1;
}
.steps-linear-item:last-child {
flex: none;
}
.steps-linear-trigger {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0.375rem;
border: none;
border-radius: 6px;
background: transparent;
color: light-dark(#475569, #c9ddf0);
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
white-space: nowrap;
cursor: pointer;
}
.steps-linear-trigger[data-state="current"],
.steps-linear-trigger[data-state="complete"] {
color: light-dark(#0f172a, #ffffff);
}
.steps-linear-trigger:hover:not([data-disabled]) {
background: light-dark(#f1f5f9, #ffffff14);
}
.steps-linear-trigger:focus-visible,
.steps-linear-nav:focus-visible {
outline: 2px solid #009dfd;
outline-offset: 2px;
}
/* Upcoming triggers are disabled in linear mode */
.steps-linear-trigger[data-disabled],
.steps-linear-nav[data-disabled] {
opacity: 0.5;
cursor: not-allowed;
}
.steps-linear-indicator {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.75rem;
height: 1.75rem;
border-radius: 9999px;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
background: light-dark(#ffffff, #1b2045);
color: light-dark(#475569, #c9ddf0);
font-size: 0.75rem;
font-weight: 600;
flex-shrink: 0;
}
.steps-linear-indicator[data-state="current"] {
border-color: #009dfd;
background: #009dfd;
color: #ffffff;
}
.steps-linear-indicator[data-state="complete"] {
border-color: #009dfd;
background: light-dark(#f1f5f9, #ffffff14);
color: light-dark(#006ce9, #4cb8ff);
}
.steps-linear-separator {
flex: 1;
height: 2px;
margin: 0 0.75rem;
background: light-dark(#e2e8f0, #ffffff1f);
}
.steps-linear-separator[data-state="complete"] {
background: #009dfd;
}
.steps-linear-content {
margin-top: 1rem;
padding: 1rem;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
border-radius: 6px;
background: light-dark(#ffffff, #1b2045);
font-size: 0.875rem;
line-height: 1.5;
color: light-dark(#475569, #c9ddf0);
}
.steps-linear-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-top: 0.75rem;
}
.steps-linear-nav {
padding: 0.375rem 0.75rem;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
border-radius: 6px;
background: light-dark(#ffffff, #1b2045);
color: light-dark(#0f172a, #ffffff);
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
}
.steps-linear-nav:hover:not([data-disabled]) {
background: light-dark(#f1f5f9, #ffffff14);
}Vertical#
Pass orientation="vertical" on Steps.Root to lay out the steps vertically and propagate data-orientation="vertical" to list, item, and separator parts.
import { component$, useStyles$ } from '@builder.io/qwik';
import { Steps } from '@leve-ui/steps';
import styles from './vertical.css?inline';
export default component$(() => {
useStyles$(styles);
return (
<Steps.Root count={3} orientation="vertical" class="steps-vertical">
<Steps.List class="steps-vertical-list">
<Steps.Item index={0} class="steps-vertical-item">
<Steps.Trigger class="steps-vertical-trigger">
<Steps.Indicator class="steps-vertical-indicator">1</Steps.Indicator>
<span>Order Placed</span>
</Steps.Trigger>
<Steps.Separator class="steps-vertical-separator" />
</Steps.Item>
<Steps.Item index={1} class="steps-vertical-item">
<Steps.Trigger class="steps-vertical-trigger">
<Steps.Indicator class="steps-vertical-indicator">2</Steps.Indicator>
<span>In Transit</span>
</Steps.Trigger>
<Steps.Separator class="steps-vertical-separator" />
</Steps.Item>
<Steps.Item index={2} class="steps-vertical-item">
<Steps.Trigger class="steps-vertical-trigger">
<Steps.Indicator class="steps-vertical-indicator">3</Steps.Indicator>
<span>Delivered</span>
</Steps.Trigger>
</Steps.Item>
</Steps.List>
<div class="steps-vertical-panel">
<Steps.Content index={0} class="steps-vertical-content">
Your order has been received and is being prepared.
</Steps.Content>
<Steps.Content index={1} class="steps-vertical-content">
Your package is on the way to your destination.
</Steps.Content>
<Steps.Content index={2} class="steps-vertical-content">
Your package has arrived at the delivery address.
</Steps.Content>
<div class="steps-vertical-actions">
<Steps.PrevTrigger class="steps-vertical-nav">Previous</Steps.PrevTrigger>
<Steps.NextTrigger class="steps-vertical-nav">Next</Steps.NextTrigger>
</div>
</div>
</Steps.Root>
);
});.steps-vertical {
display: flex;
gap: 1.5rem;
width: 440px;
max-width: 100%;
font-family: inherit;
color: light-dark(#0f172a, #ffffff);
}
.steps-vertical-list {
display: flex;
flex-direction: column;
list-style: none;
margin: 0;
padding: 0;
flex-shrink: 0;
}
.steps-vertical-item {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.steps-vertical-trigger {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0.375rem;
border: none;
border-radius: 6px;
background: transparent;
color: light-dark(#475569, #c9ddf0);
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
white-space: nowrap;
cursor: pointer;
}
.steps-vertical-trigger[data-state="current"],
.steps-vertical-trigger[data-state="complete"] {
color: light-dark(#0f172a, #ffffff);
}
.steps-vertical-trigger:hover:not([data-disabled]) {
background: light-dark(#f1f5f9, #ffffff14);
}
.steps-vertical-trigger:focus-visible,
.steps-vertical-nav:focus-visible {
outline: 2px solid #009dfd;
outline-offset: 2px;
}
.steps-vertical-indicator {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.75rem;
height: 1.75rem;
border-radius: 9999px;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
background: light-dark(#ffffff, #1b2045);
color: light-dark(#475569, #c9ddf0);
font-size: 0.75rem;
font-weight: 600;
flex-shrink: 0;
}
.steps-vertical-indicator[data-state="current"] {
border-color: #009dfd;
background: #009dfd;
color: #ffffff;
}
.steps-vertical-indicator[data-state="complete"] {
border-color: #009dfd;
background: light-dark(#f1f5f9, #ffffff14);
color: light-dark(#006ce9, #4cb8ff);
}
/* Vertical connector line centered beneath the 1.75rem indicator */
.steps-vertical-separator[data-orientation="vertical"] {
width: 2px;
height: 1.5rem;
margin: 0.25rem 0 0.25rem 1.25rem;
background: light-dark(#e2e8f0, #ffffff1f);
}
.steps-vertical-separator[data-state="complete"] {
background: #009dfd;
}
.steps-vertical-panel {
display: flex;
flex: 1;
flex-direction: column;
justify-content: space-between;
gap: 0.75rem;
}
.steps-vertical-content {
padding: 1rem;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
border-radius: 6px;
background: light-dark(#ffffff, #1b2045);
font-size: 0.875rem;
line-height: 1.5;
color: light-dark(#475569, #c9ddf0);
}
.steps-vertical-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
}
.steps-vertical-nav {
padding: 0.375rem 0.75rem;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
border-radius: 6px;
background: light-dark(#ffffff, #1b2045);
color: light-dark(#0f172a, #ffffff);
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
}
.steps-vertical-nav:hover:not([data-disabled]) {
background: light-dark(#f1f5f9, #ffffff14);
}
.steps-vertical-nav[data-disabled] {
opacity: 0.5;
cursor: not-allowed;
}Controlled#
Bind a Signal<number> with bind:step to read and update the active 0-based step index from outside.
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
import { Steps } from '@leve-ui/steps';
import { LuCheck } from '@qwikest/icons/lucide';
import styles from './controlled.css?inline';
const items = [
{ label: 'Plan', description: 'Select a monthly or annual subscription plan.' },
{ label: 'Add-ons', description: 'Customize extra storage and priority support.' },
{ label: 'Summary', description: 'Confirm your plan and complete checkout.' },
];
export default component$(() => {
useStyles$(styles);
const step = useSignal(1);
return (
<div class="steps-controlled-wrapper">
<div class="steps-controlled-toolbar">
<p class="steps-controlled-status">
Step {step.value + 1} of {items.length}
</p>
<button
type="button"
class="steps-controlled-reset"
onClick$={() => {
step.value = 0;
}}
>
Reset
</button>
</div>
<Steps.Root count={items.length} bind:step={step} class="steps-controlled">
<Steps.List class="steps-controlled-list">
{items.map((item, index) => (
<Steps.Item key={item.label} index={index} class="steps-controlled-item">
<Steps.Trigger class="steps-controlled-trigger">
<Steps.Indicator class="steps-controlled-indicator">
{step.value > index ? (
<LuCheck class="steps-controlled-check" aria-hidden="true" />
) : (
index + 1
)}
</Steps.Indicator>
<span>{item.label}</span>
</Steps.Trigger>
{index < items.length - 1 && <Steps.Separator class="steps-controlled-separator" />}
</Steps.Item>
))}
</Steps.List>
{items.map((item, index) => (
<Steps.Content key={item.label} index={index} class="steps-controlled-content">
{item.description}
</Steps.Content>
))}
<div class="steps-controlled-actions">
<Steps.PrevTrigger class="steps-controlled-nav">Previous</Steps.PrevTrigger>
<Steps.NextTrigger class="steps-controlled-nav">Next</Steps.NextTrigger>
</div>
</Steps.Root>
</div>
);
});.steps-controlled-wrapper {
display: flex;
flex-direction: column;
gap: 0.75rem;
width: 440px;
max-width: 100%;
font-family: inherit;
color: light-dark(#0f172a, #ffffff);
}
.steps-controlled-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
}
.steps-controlled-status {
margin: 0;
font-size: 0.875rem;
color: light-dark(#475569, #c9ddf0);
}
.steps-controlled-reset,
.steps-controlled-nav {
padding: 0.375rem 0.75rem;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
border-radius: 6px;
background: light-dark(#ffffff, #1b2045);
color: light-dark(#0f172a, #ffffff);
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
}
.steps-controlled-reset:hover,
.steps-controlled-nav:hover:not([data-disabled]) {
background: light-dark(#f1f5f9, #ffffff14);
}
.steps-controlled-list {
display: flex;
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
.steps-controlled-item {
display: flex;
align-items: center;
flex: 1;
}
.steps-controlled-item:last-child {
flex: none;
}
.steps-controlled-trigger {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0.375rem;
border: none;
border-radius: 6px;
background: transparent;
color: light-dark(#475569, #c9ddf0);
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
white-space: nowrap;
cursor: pointer;
}
.steps-controlled-trigger[data-state="current"],
.steps-controlled-trigger[data-state="complete"] {
color: light-dark(#0f172a, #ffffff);
}
.steps-controlled-trigger:hover:not([data-disabled]) {
background: light-dark(#f1f5f9, #ffffff14);
}
.steps-controlled-trigger:focus-visible,
.steps-controlled-reset:focus-visible,
.steps-controlled-nav:focus-visible {
outline: 2px solid #009dfd;
outline-offset: 2px;
}
.steps-controlled-indicator {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.75rem;
height: 1.75rem;
border-radius: 9999px;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
background: light-dark(#ffffff, #1b2045);
color: light-dark(#475569, #c9ddf0);
font-size: 0.75rem;
font-weight: 600;
flex-shrink: 0;
}
.steps-controlled-indicator[data-state="current"] {
border-color: #009dfd;
background: #009dfd;
color: #ffffff;
}
.steps-controlled-indicator[data-state="complete"] {
border-color: light-dark(#16a34a, #4ade80);
background: light-dark(#16a34a, #4ade80);
color: #ffffff;
}
.steps-controlled-check {
width: 0.875rem;
height: 0.875rem;
}
.steps-controlled-separator {
flex: 1;
height: 2px;
margin: 0 0.75rem;
background: light-dark(#e2e8f0, #ffffff1f);
}
.steps-controlled-separator[data-state="complete"] {
background: light-dark(#16a34a, #4ade80);
}
.steps-controlled-content {
margin-top: 1rem;
padding: 1rem;
border: 1px solid light-dark(#cbd5e1, #ffffff3d);
border-radius: 6px;
background: light-dark(#ffffff, #1b2045);
font-size: 0.875rem;
line-height: 1.5;
color: light-dark(#475569, #c9ddf0);
}
.steps-controlled-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-top: 0.75rem;
}
.steps-controlled-nav[data-disabled] {
opacity: 0.5;
cursor: not-allowed;
}API Reference#
Root#
| Prop | Default | Type |
|---|---|---|
| count (required) | – | number Total number of steps. Used to clamp the active step and disable |
| defaultStep | 0 | number Initial 0-based step index when uncontrolled. |
| bind:step | – | Signal<number> A signal holding the current 0-based step index (controlled). |
| onStepChange$ | – | QRL<(step: number) => void> Called when the active step changes. |
| linear | false | boolean When |
| orientation | 'horizontal' | 'horizontal' | 'vertical' The layout orientation of the steps list. |
Also accepts all <div> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps | Always present |
data-orientation | "horizontal" | "vertical" |
List#
No props of its own. Accepts all <ol> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps-list | Always present |
data-orientation | "horizontal" | "vertical" |
Item#
| Prop | Default | Type |
|---|---|---|
| index (required) | – | number 0-based index of this step item. |
| disabled | false | boolean Disables this step item and its trigger. |
Also accepts all <li> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps-item | Always present |
data-state | "complete" | "current" | "upcoming" |
data-disabled | Present when disabled is true |
data-orientation | "horizontal" | "vertical" |
Trigger#
No props of its own. Accepts all <button> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps-trigger | Always present |
data-state | "complete" | "current" | "upcoming" |
data-disabled | Present when the item is disabled, the trigger is disabled, or linear blocks an upcoming step |
Indicator#
No props of its own. Accepts all <span> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps-indicator | Always present |
data-state | "complete" | "current" | "upcoming" |
Separator#
No props of its own. Accepts all <div> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps-separator | Always present |
data-state | "complete" | "current" | "upcoming" |
data-orientation | "horizontal" | "vertical" |
Content#
| Prop | Default | Type |
|---|---|---|
| index (required) | – | number 0-based index of the step this content panel belongs to. |
Also accepts all <div> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps-content | Always present |
data-state | "open" | "closed" |
PrevTrigger#
No props of its own. Accepts all <button> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps-prev-trigger | Always present |
data-disabled | Present on the first step or when disabled is true |
NextTrigger#
No props of its own. Accepts all <button> attributes.
| Data attribute | Value |
|---|---|
data-leve-steps-next-trigger | Always present |
data-disabled | Present on the last step or when disabled is true |
Accessibility#
Steps.Listrenders a semantic<ol>and eachSteps.Itemrenders an<li>.- The active
Steps.Itemreceivesaria-current="step". Steps.IndicatorandSteps.Separatorrenderaria-hidden="true"so screen readers skip decorative numbers, icons, and connector lines.Steps.Trigger,Steps.PrevTrigger, andSteps.NextTriggerare native<button type="button">elements using the nativedisabledattribute when inactive or blocked bylinearmode.
Keyboard Interactions#
| Key | Description |
|---|---|
Tab / Shift+Tab | Moves focus between enabled step triggers and navigation buttons. |
Enter / Space | Activates the focused trigger or navigation button. |