Navigation · astro-ui · Stepper

Stepper

Ordered progress indicator with complete/current/upcoming states.

Stepper visualizes multi-step progress as a semantic <ol>: numbered markers, ✓ for completed steps, and optional links per step. Connectors are CSS pseudo-elements; states are data-attributes.

Features

  • Semantic ol with aria-current="step"
  • complete/current/upcoming/disabled states
  • Horizontal + vertical orientations
  • Optional per-step links
  • Dots or line connectors

Usage

---
import { Stepper } from "astro-ui";
---

<Stepper
  ariaLabel="Checkout progress"
  items={[
    { label: "Cart", complete: true },
    { label: "Shipping", current: true, description: "Address & delivery" },
    { label: "Payment" },
  ]}
/>

Demos

Basic

  1. Cart
  2. ShippingAddress & delivery
  3. Payment
<Stepper
  items={[
    { label: "Cart", complete: true },
    { label: "Shipping", current: true, description: "Address & delivery" },
    { label: "Payment" },
  ]}
/>

Vertical

  1. Account
  2. Profile
  3. Done
<Stepper orientation="vertical"
  items={[
    { label: "Account", complete: true },
    { label: "Profile", current: true },
    { label: "Done" },
  ]}
/>

API

Props

PropTypeDefaultDescription
itemsStepperItem[][]Steps: { label, description?, complete?, current?, disabled?, href? }.
orientation"horizontal" | "vertical""horizontal"Layout.
variant"line" | "dots""line"Connector style.
size"sm" | "md" | "lg""md"Scale.
ariaLabelstring"Progress"Group name.
classstring—Merged via cn(); Tailwind classes welcome.
idstring—Element id.

Accessibility

Implemented accessibility features — semantics, ARIA wiring, and keyboard behavior that ship with the component.

  • Semantic <ol> — steps announced in order
  • aria-current="step" marks the active step; complete steps render a checkmark
  • Per-step links remain real anchors

Changelog

Version history mentioning Stepper.

v0.1.0 — 2026-11-11
added
  • Navigation (7): Tabs, Breadcrumb, Pagination, Stepper, Tree, Navbar, Sidebar.