Steppers
The steps of a process: horizontal, vertical, with links and as a wizard, with the state of every step in words.
Horizontal
Steps of a process in order. It is a nav with an ordered list, so a screen reader hears “list, 4 items”; the current step has aria-current="step" and a visually hidden word says the state of every step (“Completed: Account”), so the state is never only a colour or an icon. Styles follow data-state (complete, current, upcoming, error) through group-data-[state=…], so one markup serves every state. On a phone only the circles stay and a line below names the current step.
- Completed: Account
- 2 Current step: Shipping
- 3 Upcoming: Payment
- 4 Upcoming: Review
<div id="stepper-1499-wrapper">
<ol id="stepper-1499" aria-label="Checkout progress" class="flex items-start">
<li data-state="complete" data-index="0" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i aria-hidden="true" class="fa-solid fa-check"></i
></span>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Completed: </span>
<span>Account</span>
</span>
</span>
</li>
<li
data-state="current"
data-index="1"
aria-current="step"
class="group/step relative flex flex-1 justify-center"
>
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">2</i></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Current step: </span>
<span>Shipping</span>
</span>
</span>
</li>
<li data-state="upcoming" data-index="2" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">3</i></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Upcoming: </span>
<span>Payment</span>
</span>
</span>
</li>
<li data-state="upcoming" data-index="3" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">4</i></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Upcoming: </span>
<span>Review</span>
</span>
</span>
</li>
</ol>
</div>
States
Complete is a filled circle with a check, current an outlined circle with the number, upcoming a grey outline, and error a red filled circle with an exclamation mark. The connector in front of a step is filled when the step is not upcoming. Each state differs by shape and by a word for assistive technology, not by colour alone.
- Completed: Cart
- Error: Shipping
- 3 Current step: Payment
- 4 Upcoming: Review
<div id="stepper-1500-wrapper">
<ol id="stepper-1500" aria-label="Order progress" class="flex items-start">
<li data-state="complete" data-index="0" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i aria-hidden="true" class="fa-solid fa-check"></i
></span>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Completed: </span>
<span>Cart</span>
</span>
</span>
</li>
<li data-state="error" data-index="1" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i aria-hidden="true" class="fa-solid fa-exclamation"></i
></span>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Error: </span>
<span>Shipping</span>
</span>
</span>
</li>
<li
data-state="current"
data-index="2"
aria-current="step"
class="group/step relative flex flex-1 justify-center"
>
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">3</i></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Current step: </span>
<span>Payment</span>
</span>
</span>
</li>
<li data-state="upcoming" data-index="3" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">4</i></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Upcoming: </span>
<span>Review</span>
</span>
</span>
</li>
</ol>
</div>
Vertical with descriptions
For a checklist or a setup guide, where every step has a sentence. The line runs down the left and is filled up to the last complete step.
- Completed: Create your account Done on Nov 3.
- 2 Current step: Verify your email We sent a link to your inbox.
- 3 Upcoming: Add your first product Upload photos and set a price.
- 4 Upcoming: Go live Publish your store.
<div id="stepper-1501-wrapper">
<ol id="stepper-1501" aria-label="Setup steps" class="flex flex-col">
<li data-state="complete" data-index="0" class="group/step relative flex gap-4 pb-8 last:pb-0">
<span
aria-hidden="true"
class="absolute top-9 bottom-0 left-4 w-0.5 -translate-x-1/2 bg-dominant-300 group-last/step:hidden group-data-[state=complete]/step:bg-primary-700 dark:bg-dominant-700 dark:group-data-[state=complete]/step:bg-primary-400"
>
</span>
<span class="flex items-start gap-4">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i aria-hidden="true" class="fa-solid fa-check"></i
></span>
<span
class="pt-1 text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Completed: </span>
<span>Create your account</span>
<span class="block mt-0.5 text-sm font-normal text-dominant-700 dark:text-dominant-200"
>Done on Nov 3.</span
>
</span>
</span>
</li>
<li
data-state="current"
data-index="1"
aria-current="step"
class="group/step relative flex gap-4 pb-8 last:pb-0"
>
<span
aria-hidden="true"
class="absolute top-9 bottom-0 left-4 w-0.5 -translate-x-1/2 bg-dominant-300 group-last/step:hidden group-data-[state=complete]/step:bg-primary-700 dark:bg-dominant-700 dark:group-data-[state=complete]/step:bg-primary-400"
>
</span>
<span class="flex items-start gap-4">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">2</i></span
>
<span
class="pt-1 text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Current step: </span>
<span>Verify your email</span>
<span class="block mt-0.5 text-sm font-normal text-dominant-700 dark:text-dominant-200"
>We sent a link to your inbox.</span
>
</span>
</span>
</li>
<li data-state="upcoming" data-index="2" class="group/step relative flex gap-4 pb-8 last:pb-0">
<span
aria-hidden="true"
class="absolute top-9 bottom-0 left-4 w-0.5 -translate-x-1/2 bg-dominant-300 group-last/step:hidden group-data-[state=complete]/step:bg-primary-700 dark:bg-dominant-700 dark:group-data-[state=complete]/step:bg-primary-400"
>
</span>
<span class="flex items-start gap-4">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">3</i></span
>
<span
class="pt-1 text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Upcoming: </span>
<span>Add your first product</span>
<span class="block mt-0.5 text-sm font-normal text-dominant-700 dark:text-dominant-200"
>Upload photos and set a price.</span
>
</span>
</span>
</li>
<li data-state="upcoming" data-index="3" class="group/step relative flex gap-4 pb-8 last:pb-0">
<span
aria-hidden="true"
class="absolute top-9 bottom-0 left-4 w-0.5 -translate-x-1/2 bg-dominant-300 group-last/step:hidden group-data-[state=complete]/step:bg-primary-700 dark:bg-dominant-700 dark:group-data-[state=complete]/step:bg-primary-400"
>
</span>
<span class="flex items-start gap-4">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">4</i></span
>
<span
class="pt-1 text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Upcoming: </span>
<span>Go live</span>
<span class="block mt-0.5 text-sm font-normal text-dominant-700 dark:text-dominant-200"
>Publish your store.</span
>
</span>
</span>
</li>
</ol>
</div>
Going back
Completed steps are links, so the person can go back and fix something; the current and the upcoming steps are not links, because the next step must be reached through the form. A link has a focus ring and the same name as before.
- Completed: Account
- Completed: Shipping
- 3 Current step: Payment
- 4 Upcoming: Review
<div id="stepper-1502-wrapper">
<ol id="stepper-1502" aria-label="Checkout progress with links" class="flex items-start">
<li data-state="complete" data-index="0" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<a
href="#"
class="flex flex-col items-center gap-2 rounded-lg focus-visible:ring-2 focus-visible:ring-primary-700 focus-visible:outline-none dark:focus-visible:ring-primary-400"
>
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i aria-hidden="true" class="fa-solid fa-check"></i
></span>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Completed: </span>
<span>Account</span>
</span>
</a>
</li>
<li data-state="complete" data-index="1" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<a
href="#"
class="flex flex-col items-center gap-2 rounded-lg focus-visible:ring-2 focus-visible:ring-primary-700 focus-visible:outline-none dark:focus-visible:ring-primary-400"
>
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i aria-hidden="true" class="fa-solid fa-check"></i
></span>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Completed: </span>
<span>Shipping</span>
</span>
</a>
</li>
<li
data-state="current"
data-index="2"
aria-current="step"
class="group/step relative flex flex-1 justify-center"
>
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">3</i></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Current step: </span>
<span>Payment</span>
</span>
</span>
</li>
<li data-state="upcoming" data-index="3" class="group/step relative flex flex-1 justify-center">
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i class="not-italic">4</i></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span class="sr-only"> Upcoming: </span>
<span>Review</span>
</span>
</span>
</li>
</ol>
</div>
Wizard
A stepper that drives a form. The component only keeps the number of the current step; the circles take their data-state and aria-current from it. The panel below is a role="status" so the change of step is announced. Replace the panel with your own form and validate before step++.
- 1 Account
- 2 Shipping
- 3 Payment
- 4 Review
<div
id="stepper-1503-wrapper"
x-data='stepperWizard([{"text":"Account","panel":"Fill in this step, then continue."},{"text":"Shipping","panel":"Fill in this step, then continue."},{"text":"Payment","panel":"Fill in this step, then continue."},{"text":"Review","panel":"Everything is ready. Place your order."}])'
>
<ol id="stepper-1503" aria-label="Wizard" class="flex items-start">
<li
data-index="0"
x-bind:data-state="state(Number($el.dataset.index))"
x-bind:aria-current="Number($el.dataset.index) === step ? 'step' : null"
class="group/step relative flex flex-1 justify-center"
>
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i
x-bind:class="{ 'fa-solid fa-check': state(0) === 'complete', 'not-italic': state(0) !== 'complete', 'fa-exclamation': false }"
x-bind:aria-hidden="state(0) === 'complete' ? 'true' : null"
x-text="state(0) === 'complete' ? '' : 1"
class="not-italic"
>1</i
></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span
x-text="({ complete: ' Completed: ', current: ' Current step: ', upcoming: ' Upcoming: ' })[state(0)]"
class="sr-only"
></span>
<span>Account</span>
</span>
</span>
</li>
<li
data-index="1"
x-bind:data-state="state(Number($el.dataset.index))"
x-bind:aria-current="Number($el.dataset.index) === step ? 'step' : null"
class="group/step relative flex flex-1 justify-center"
>
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i
x-bind:class="{ 'fa-solid fa-check': state(1) === 'complete', 'not-italic': state(1) !== 'complete', 'fa-exclamation': false }"
x-bind:aria-hidden="state(1) === 'complete' ? 'true' : null"
x-text="state(1) === 'complete' ? '' : 2"
class="not-italic"
>2</i
></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span
x-text="({ complete: ' Completed: ', current: ' Current step: ', upcoming: ' Upcoming: ' })[state(1)]"
class="sr-only"
></span>
<span>Shipping</span>
</span>
</span>
</li>
<li
data-index="2"
x-bind:data-state="state(Number($el.dataset.index))"
x-bind:aria-current="Number($el.dataset.index) === step ? 'step' : null"
class="group/step relative flex flex-1 justify-center"
>
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i
x-bind:class="{ 'fa-solid fa-check': state(2) === 'complete', 'not-italic': state(2) !== 'complete', 'fa-exclamation': false }"
x-bind:aria-hidden="state(2) === 'complete' ? 'true' : null"
x-text="state(2) === 'complete' ? '' : 3"
class="not-italic"
>3</i
></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span
x-text="({ complete: ' Completed: ', current: ' Current step: ', upcoming: ' Upcoming: ' })[state(2)]"
class="sr-only"
></span>
<span>Payment</span>
</span>
</span>
</li>
<li
data-index="3"
x-bind:data-state="state(Number($el.dataset.index))"
x-bind:aria-current="Number($el.dataset.index) === step ? 'step' : null"
class="group/step relative flex flex-1 justify-center"
>
<span
aria-hidden="true"
class="absolute top-4 right-1/2 h-0.5 w-full -translate-y-1/2 bg-primary-700 group-data-[state=upcoming]/step:bg-dominant-300 dark:bg-primary-400 dark:group-data-[state=upcoming]/step:bg-dominant-700 group-first/step:hidden"
>
</span>
<span class="flex flex-col items-center gap-2">
<span
class="relative z-10 flex shrink-0 items-center justify-center size-8 text-sm font-semibold text-dominant-700 dark:text-dominant-200 bg-white dark:bg-dominant-900 rounded-full border-2 border-dominant-500 dark:border-dominant-400 group-data-[state=complete]/step:border-primary-700 dark:group-data-[state=complete]/step:border-primary-400 group-data-[state=complete]/step:bg-primary-700 dark:group-data-[state=complete]/step:bg-primary-400 group-data-[state=complete]/step:text-white dark:group-data-[state=complete]/step:text-primary-950 group-data-[state=current]/step:border-primary-700 dark:group-data-[state=current]/step:border-primary-400 group-data-[state=current]/step:text-primary-800 dark:group-data-[state=current]/step:text-primary-300 group-data-[state=error]/step:border-danger-700 dark:group-data-[state=error]/step:border-danger-400 group-data-[state=error]/step:bg-danger-700 dark:group-data-[state=error]/step:bg-danger-400 group-data-[state=error]/step:text-white dark:group-data-[state=error]/step:text-danger-950"
><i
x-bind:class="{ 'fa-solid fa-check': state(3) === 'complete', 'not-italic': state(3) !== 'complete', 'fa-exclamation': false }"
x-bind:aria-hidden="state(3) === 'complete' ? 'true' : null"
x-text="state(3) === 'complete' ? '' : 4"
class="not-italic"
>4</i
></span
>
<span
class="text-sm font-medium text-dominant-700 group-data-[state=current]/step:text-dominant-900 group-data-[state=error]/step:text-danger-700 dark:text-dominant-200 dark:group-data-[state=current]/step:text-white dark:group-data-[state=error]/step:text-danger-300 max-sm:sr-only"
>
<span
x-text="({ complete: ' Completed: ', current: ' Current step: ', upcoming: ' Upcoming: ' })[state(3)]"
class="sr-only"
></span>
<span>Review</span>
</span>
</span>
</li>
</ol>
<div>
<p
aria-hidden="true"
x-text="'Step ' + (step + 1) + ' of ' + steps.length + ': ' + steps[step].text"
class="mt-3 text-center text-sm font-medium text-dominant-900 dark:text-white sm:hidden"
></p>
<div
role="status"
class="mt-6 p-5 rounded-xl border border-dominant-200 dark:border-dominant-700"
>
<h3
x-text="steps[step].text"
class="text-base font-semibold text-dominant-900 dark:text-white"
></h3>
<p
x-text="steps[step].panel || ''"
class="mt-1 text-sm text-dominant-700 dark:text-dominant-200"
></p>
</div>
<div class="flex justify-between mt-4">
<button
id="stepper-1503-back"
type="button"
x-bind:disabled="step === 0"
x-on:click="back()"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 inset-ring inset-ring-dominant-300 dark:inset-ring-dominant-600 bg-white dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200 dark:shadow-none shadow-sm not-disabled:hover:bg-dominant-100 dark:not-disabled:hover:bg-dominant-700 not-disabled:hover:text-dominant-900 dark:not-disabled:hover:text-white not-disabled:active:bg-dominant-200 dark:not-disabled:active:bg-dominant-600 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-4 py-2.5 text-sm in-[.button-group-extra-small]:gap-1.5 in-[.button-group-extra-small]:px-2.5 in-[.button-group-extra-small]:py-1 in-[.button-group-extra-small]:text-xs in-[.button-group-small]:gap-1.5 in-[.button-group-small]:px-3 in-[.button-group-small]:py-1.5 in-[.button-group-small]:text-sm in-[.button-group-large]:gap-2 in-[.button-group-large]:px-5 in-[.button-group-large]:py-3 in-[.button-group-large]:text-base in-[.button-group-extra-large]:gap-2.5 in-[.button-group-extra-large]:px-6 in-[.button-group-extra-large]:py-3.5 in-[.button-group-extra-large]:text-lg"
>
<span>Back</span>
</button>
<button
id="stepper-1503-next"
type="button"
x-on:click="next()"
x-text="step < steps.length - 1 ? 'Next' : 'Start over'"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 bg-primary-600 text-white shadow-sm not-disabled:hover:bg-primary-700 not-disabled:active:bg-primary-800 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 in-[.button-group-subtle]:bg-primary-100 in-[.button-group-subtle]:text-primary-800 in-[.button-group-subtle]:not-disabled:hover:bg-primary-200 in-[.button-group-subtle]:not-disabled:active:bg-primary-300 in-[.button-group-subtle]:focus-visible:ring-primary-700 in-[.button-group-subtle]:dark:bg-primary-900/50 in-[.button-group-subtle]:dark:text-primary-300 in-[.button-group-subtle]:dark:not-disabled:hover:bg-primary-900 in-[.button-group-subtle]:dark:focus-visible:ring-primary-400 in-[.button-group-subtle]:shadow-none in-[.button-group-outline]:inset-ring in-[.button-group-outline]:inset-ring-primary-300 in-[.button-group-outline]:bg-white in-[.button-group-outline]:text-primary-800 in-[.button-group-outline]:shadow-sm in-[.button-group-outline]:not-disabled:hover:bg-primary-50 in-[.button-group-outline]:not-disabled:active:bg-primary-100 in-[.button-group-outline]:focus-visible:ring-primary-700 in-[.button-group-outline]:dark:inset-ring-primary-700 in-[.button-group-outline]:dark:bg-dominant-900 in-[.button-group-outline]:dark:text-primary-200 in-[.button-group-outline]:dark:shadow-none in-[.button-group-outline]:dark:not-disabled:hover:bg-primary-900/50 in-[.button-group-outline]:dark:focus-visible:ring-primary-400 button-selected:bg-primary-600 button-selected:text-white button-selected:inset-ring-primary-600 button-selected:not-disabled:hover:bg-primary-700 button-selected:not-disabled:hover:text-white button-selected:not-disabled:active:bg-primary-800 button-selected:dark:bg-primary-600 button-selected:dark:inset-ring-primary-600 button-selected:dark:text-white button-selected:dark:not-disabled:hover:bg-primary-700 button-selected:dark:not-disabled:hover:text-white button-selected:dark:not-disabled:active:bg-primary-800 button-selected:in-[.button-group-solid]:bg-primary-800 button-selected:in-[.button-group-solid]:not-disabled:hover:bg-primary-800 button-selected:in-[.button-group-solid]:dark:bg-primary-800 button-selected:in-[.button-group-solid]:dark:not-disabled:hover:bg-primary-800 gap-2 px-4 py-2.5 text-sm in-[.button-group-extra-small]:gap-1.5 in-[.button-group-extra-small]:px-2.5 in-[.button-group-extra-small]:py-1 in-[.button-group-extra-small]:text-xs in-[.button-group-small]:gap-1.5 in-[.button-group-small]:px-3 in-[.button-group-small]:py-1.5 in-[.button-group-small]:text-sm in-[.button-group-large]:gap-2 in-[.button-group-large]:px-5 in-[.button-group-large]:py-3 in-[.button-group-large]:text-base in-[.button-group-extra-large]:gap-2.5 in-[.button-group-extra-large]:px-6 in-[.button-group-extra-large]:py-3.5 in-[.button-group-extra-large]:text-lg"
>
<span>Next</span>
</button>
</div>
</div>
</div>
Options reference
The stepper is HTML and Tailwind classes. Only the wizard example uses a small Alpine object for the current step.
| Part | Value | Description |
|---|---|---|
nav aria-label
|
text | Required: names the stepper, for example “Checkout progress”. |
ol and li
|
elements |
One li per step, with the group/step class.
|
data-state
|
complete, current, upcoming, error
|
On the li. All the styles follow it.
|
aria-current="step"
|
on the current li
|
Tells assistive technology which step it is. |
| State word | visually hidden |
A sr-only text in the step (“Completed: ”) that shows for the state of the step.
|
| Connector |
absolute … h-0.5 w-full
|
A line from the middle of this step to the middle of the previous one; steps have equal width (flex-1).
|
| Link |
a in a completed step
|
Only for steps the person may go back to. |
| Small screens |
max-sm:sr-only
|
Labels hide on a phone, and a line below names the current step. |