Skip to content
Bitsy UI 0.x
Theme
Menu: Stepper
  1. Docs
  2. Bits

Stepper

Stepper shows progress through a task with a fixed number of steps. It is a named ordered list with CSS-numbered markers, check marks, connectors, and no JavaScript.

Public web API

One root hook on a named <ol>. Mark done steps with data-bitsy-state="complete" and the current one with aria-current="step".

  1. Completed: Cart
  2. Shipping
  3. Payment
<ol data-bitsy-stepper aria-label="Checkout progress">
  <li data-bitsy-stepper-step data-bitsy-state="complete">
    <a data-bitsy-stepper-label href="/checkout/cart"><span class="u-visually-hidden">Completed: </span>Cart</a>
  </li>
  <li data-bitsy-stepper-step aria-current="step">
    <span data-bitsy-stepper-label>Shipping</span>
  </li>
  <li data-bitsy-stepper-step>
    <span data-bitsy-stepper-label>Payment</span>
  </li>
</ol>
  • Never type step numbers. A CSS counter draws them.
  • Keep the hidden "Completed: " text so done steps are not shown by color alone.
  • Only completed steps may be links. Upcoming steps stay plain text.

States and sizes

Five steps, then a larger marker through a hook.

  1. Completed: Account
  2. Completed: Profile
  3. Team
  4. Billing
  5. Launch
  1. Completed: Details
  2. Review
  3. Submit

Vertical

data-bitsy-orientation="vertical" with a description under each step.

  1. Completed: Your profile Name and photo.
  2. Invite your team Add teammates by email.
  3. Connect billing Choose a plan.

Foundation versus Bit

The foundation styles ordered lists, but not numbered markers, check marks, connectors, or step states. data-bitsy-stepper adds those, ships no JavaScript, and defines only --bitsy-stepper-* hooks.

Bitsy UI is MIT licensed. Source on GitHub.