CSS Step Progress Indicator
A four-step checkout rail that fills as you move forward, with done, current, and upcoming states.

A step progress indicator shows where a person is in a short sequence: cart, details, payment, review. The search is “css stepper” and “multi step progress bar”. The useful version has three visible states, a rail that fills up to the current step, and labels that stay readable when the step is not current. A line with no words is a loading bar. A stepper is a map.
The demo moves with Back and Continue. The rail’s width transitions. Completed steps swap their number for a check. The current step keeps its number and a stronger label. Upcoming steps stay outlined. Nothing depends on a framework.
For a single percentage, use the circular progress bar. For a plan picker rather than a sequence, use the pricing table.
States
data-state is done, current, or todo. The script sets it from the index. CSS only knows the attribute.
li[data-state="done"] span,
li[data-state="current"] span {
background: #0f766e;
border-color: #0f766e;
color: white;
}
li[data-state="current"] { color: #0f172a; font-weight: 650; }
Upcoming circles stay white with a gray ring so they still look clickable later if you make them buttons. In this demo they are not buttons. The Back and Continue controls own the navigation, which is the right model for a checkout. Letting people jump to “Review” before “Payment” is a product decision, not a CSS one. If you do allow jumps, make each step a button and move the index in one function so the rail and the panel cannot disagree.
The rail
The track is a pseudo-element. The fill is an element whose width is index / (count - 1).
fill.style.width = (index / (items.length - 1)) * 76 + "%";
The 76 matches a track that is inset 12% from each side, so the line runs from the center of the first circle to the center of the last. At step 0 the fill width is 0. At the last step it meets the final circle. The width transition is 350ms. That is long enough to see direction and short enough that the panel copy can change with it.
The panel title and the paragraph update in the same function as the rail. If you animate the rail and forget the copy, the indicator lies. One paint() function writes every output: states, checks, width, title, body, and the disabled state of Back.
Checks and numbers
Completed steps show a check. The current step shows its number, because “you are here” is more useful than a second check. Upcoming steps show their number so the length of the flow is visible before you start. Hiding later labels (“Step 3 of 4” with no names) is worse: people want to know that payment is coming.
aria worth adding in a production form: aria-current="step" on the current item. The demo’s current state is visual and in the heading text, which changes to the step name. Adding aria-current is a one-line improvement when this sits above a real form.
Mobile
Four named steps fit a phone if the labels are a single short word. “Billing address” will wrap under the circle and collide with its neighbor. On a narrow screen, keep the rail and show only the current label in the heading, which this layout already does in the title under the steps. If the labels wrap, drop them under 400px and keep the numbers.
Questions about step indicators
How do I build a multi-step progress bar in CSS?
Lay the steps out in a grid of equal columns. Draw a track with a pseudo-element through the circle centers. Fill a second bar to index / (steps - 1) of that track. Style done, current, and upcoming from one data attribute.
Should completed steps show a check or a number?
A check. The current step keeps its number so “you are here” stays obvious. Upcoming steps keep numbers so the length of the flow is visible.
Can users click ahead?
Only if every earlier step is valid. Otherwise Back and Continue are the controls, and the rail is a display. Jumping ahead is how a stepper and the form get out of sync.