CSS Progress Stepper

A numbered step indicator for checkouts and wizards, with done, current and upcoming states.

  • steps
  • wizard
  • checkout
  • progress
  • counter
HTML
<ol class="stepper">
  <li class="done">Cart</li>
  <li aria-current="step">Shipping</li>
  <li>Payment</li>
</ol>
CSS
.stepper {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  font: 600 13px/1 system-ui, sans-serif;
}

.stepper li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 90px;
  color: #94a3b8;
  counter-increment: step;
}

/* Number bubble */
.stepper li::before {
  content: counter(step);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
}

/* Connector line to the previous step */
.stepper li + li::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: #e2e8f0;
}

.stepper .done,
.stepper [aria-current] {
  color: #0f172a;
}

.stepper .done::before {
  content: "\2713";
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

.stepper [aria-current]::before {
  border-color: #10b981;
  color: #10b981;
}

.stepper [aria-current]::after {
  background: #10b981;
}

About this CSS Progress Stepper

This CSS Progress Stepper is 63 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses CSS Grid and Flexbox. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #94a3b8
  • #cbd5e1
  • #fff
  • #e2e8f0
  • #0f172a
  • #10b981

How to use this progress stepper

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .stepper class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback