About this snippet

Guide users through multi-step forms with this clean progress stepper. We connect the numbered steps with lines and use highlighting to clearly show the current stage of the process.

Size
1.5 KB
Uses
HTML, CSS
Loads
Nothing external
Views
598
<div class="stepper">
  <div class="step completed">
    <div class="circle">&#10003;</div>
    <div class="label">Account</div>
  </div>
  <div class="line completed"></div>
  <div class="step active">
    <div class="circle">2</div>
    <div class="label">Shipping</div>
  </div>
  <div class="line"></div>
  <div class="step">
    <div class="circle">3</div>
    <div class="label">Payment</div>
  </div>
</div>
.stepper {
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.3s;
}
.label {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #9ca3af;
  font-weight: 500;
}
.line {
  width: 80px;
  height: 2px;
  background: #e5e7eb;
  margin: 0 -15px 25px -15px;
  z-index: 0;
}
/* Active State */
.step.active .circle {
  border-color: #3b82f6;
  color: #3b82f6;
}
.step.active .label {
  color: #3b82f6;
}
/* Completed State */
.step.completed .circle {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}
.step.completed .label {
  color: #1f2937;
}
.line.completed {
  background: #3b82f6;
}
Esc
↑↓ moveEnter select

Start from a template

Open an .html file, or HTML, CSS, JS, Markdown, Less or TypeScript files. You can also drop them here. Styles and scripts go into their panes.

Share

Source

Keyboard shortcuts

Save