Expanding Step Panels
A copy-paste steppers & wizards component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Steppers & WizardsHTMLCSSany framework
Copy into your project
HTML
<ol class="nuda-st2-expand-panels">
<li class="is-done">
<div class="nuda-st2-expand-panels__head">
<span class="nuda-st2-expand-panels__num">✓<span class="nuda-st2-expand-panels__sr"> completed</span></span>
<span class="nuda-st2-expand-panels__title">Shipping address</span>
</div>
</li>
<li class="is-active" aria-current="step">
<div class="nuda-st2-expand-panels__head">
<span class="nuda-st2-expand-panels__num">2</span>
<span class="nuda-st2-expand-panels__title">Delivery method</span>
</div>
<div class="nuda-st2-expand-panels__body">
<p>Choose how fast you want it there.</p>
<button type="button">Continue</button>
</div>
</li>
<li>
<div class="nuda-st2-expand-panels__head">
<span class="nuda-st2-expand-panels__num">3</span>
<span class="nuda-st2-expand-panels__title">Payment</span>
</div>
</li>
</ol>CSS
.nuda-st2-expand-panels {
list-style: none;
margin: 0;
padding: 0;
width: 100%;
max-width: 300px;
display: flex;
flex-direction: column;
gap: 6px;
}
.nuda-st2-expand-panels li {
background: rgba(255,255,255,.02);
border: 1px solid rgba(255,255,255,.07);
border-radius: 12px;
overflow: hidden;
}
.nuda-st2-expand-panels__head {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 14px;
min-height: 44px;
}
.nuda-st2-expand-panels__num {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
flex-shrink: 0;
border-radius: 50%;
background: rgba(255,255,255,.05);
border: 1px solid rgba(255,255,255,.12);
color: #a0a0a8;
font-size: 11px;
font-weight: 700;
transition: background .3s,border-color .3s,color .3s;
}
.nuda-st2-expand-panels li.is-done .nuda-st2-expand-panels__num {
background: #e4ff54;
border-color: #e4ff54;
color: #09090b;
}
.nuda-st2-expand-panels li.is-active .nuda-st2-expand-panels__num {
border-color: #e4ff54;
color: #e4ff54;
}
.nuda-st2-expand-panels__title {
color: #a0a0a8;
font-size: 12px;
font-weight: 500;
transition: color .3s;
}
.nuda-st2-expand-panels li.is-active .nuda-st2-expand-panels__title {
color: #fafafa;
}
.nuda-st2-expand-panels__sr {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
.nuda-st2-expand-panels__body {
display: grid;
grid-template-rows: 1fr;
opacity: 1;
transition: grid-template-rows .4s cubic-bezier(.16,1,.3,1),opacity .3s ease;
}
.nuda-st2-expand-panels__body>p {
margin: 0;
padding: 0 14px 12px;
color: #a0a0a8;
font-size: 11px;
min-height: 0;
overflow: hidden;
}
.nuda-st2-expand-panels__body button {
margin: 0 14px 14px;
padding: 9px 14px;
min-height: 38px;
background: #e4ff54;
color: #09090b;
border: 0;
border-radius: 8px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
transition: filter .2s,transform .15s;
}
.nuda-st2-expand-panels__body button:hover {
filter: brightness(1.08);
transform: translateY(-1px);
}
.nuda-st2-expand-panels__body button:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
.nuda-st2-expand-panels li:not(.is-active) .nuda-st2-expand-panels__body {
grid-template-rows: 0fr;
opacity: 0;
}
.nuda-st2-expand-panels li:not(.is-active) .nuda-st2-expand-panels__body>p,.nuda-st2-expand-panels li:not(.is-active) .nuda-st2-expand-panels__body button {
padding-top: 0;
padding-bottom: 0;
margin-bottom: 0;
visibility: hidden;
}
@media (prefers-reduced-motion:reduce) {
.nuda-st2-expand-panels__body {
transition: opacity .15s linear;
}
}
How to use Expanding Step Panels
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.