Skip to content

Step Indicator

A copy-paste form states component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Form StatesHTMLCSSany framework
  1. Account
  2. Profile
  3. 3Payment
  4. 4Done

Copy into your project

HTML
<!-- Step Indicator (toggle .is-done / .is-current as the user progresses) -->
<ol class="nuda-steps" aria-label="Form progress">
  <li class="nuda-steps__item is-done">
    <span class="nuda-steps__dot">
      <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
           stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
        <path d="M5 12 L10 17 L20 7" />
      </svg>
    </span>
    <span class="nuda-steps__label">Account</span>
  </li>
  <li class="nuda-steps__item is-current">
    <span class="nuda-steps__dot">2</span>
    <span class="nuda-steps__label">Profile</span>
  </li>
  <li class="nuda-steps__item">
    <span class="nuda-steps__dot">3</span>
    <span class="nuda-steps__label">Payment</span>
  </li>
  <li class="nuda-steps__item">
    <span class="nuda-steps__dot">4</span>
    <span class="nuda-steps__label">Done</span>
  </li>
</ol>
CSS
/* Step Indicator
   Multi-step form progress: completed/current/upcoming with connector line.
   Customize: --step-accent, --step-track */

.nuda-steps {
  --step-accent: #e4ff54;
  --step-track: rgba(255, 255, 255, 0.08);
  list-style: none;
  display: flex;
  align-items: flex-start;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 280px;
}

.nuda-steps__item {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.nuda-steps__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 1.5px;
  background: var(--step-track);
  transition: background 0.3s;
}

.nuda-steps__item.is-done::after,
.nuda-steps__item.is-current::after {
  background: rgba(228, 255, 84, 0.5);
}

.nuda-steps__dot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--step-track);
  font: 700 0.7rem ui-sans-serif, system-ui, sans-serif;
  color: #a1a1aa;
  transition: all 0.3s;
}

.nuda-steps__dot svg { width: 12px; height: 12px; }

.nuda-steps__item.is-done .nuda-steps__dot {
  background: var(--step-accent);
  border-color: var(--step-accent);
  color: #09090b;
  box-shadow: 0 0 8px rgba(228, 255, 84, 0.3);
  animation: nuda-step-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nuda-steps__item.is-current .nuda-steps__dot {
  background: rgba(228, 255, 84, 0.1);
  border-color: var(--step-accent);
  color: var(--step-accent);
  box-shadow: 0 0 0 4px rgba(228, 255, 84, 0.08);
}

.nuda-steps__item.is-current .nuda-steps__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--step-accent);
  opacity: 0;
  animation: nuda-step-pulse 1.6s ease-out infinite;
}

.nuda-steps__label {
  font: 600 0.625rem ui-sans-serif, system-ui, sans-serif;
  color: #a1a1aa;
  text-align: center;
}

.nuda-steps__item.is-done .nuda-steps__label,
.nuda-steps__item.is-current .nuda-steps__label {
  color: #fafafa;
}

@keyframes nuda-step-pop {
  0%   { transform: scale(0.6); }
  100% { transform: scale(1); }
}

@keyframes nuda-step-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0;   }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-steps__item.is-current .nuda-steps__dot::after { animation: none; }
}

How to use Step Indicator

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More form states components

← Browse all NudaUI components