Skip to content

Waveform Scrubber

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

Audio & WaveformsHTMLCSSany framework
0:423:18

Copy into your project

HTML
<div class="nuda-scrub">
  <div class="nuda-scrub__bars">
    <!-- Repeat per sample. Add .is-played for played portion. -->
    <span class="nuda-scrub__bar is-played" style="height:50%"></span>
    <span class="nuda-scrub__bar is-played" style="height:80%"></span>
    <span class="nuda-scrub__bar" style="height:60%"></span>
    <!-- ... -->
  </div>
  <div class="nuda-scrub__time">
    <span>0:42</span>
    <span>3:18</span>
  </div>
</div>
CSS
.nuda-scrub {
  padding: 12px 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  width: 100%;
  max-width: 280px;
}

.nuda-scrub__bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  cursor: pointer;
  margin-bottom: 6px;
}

.nuda-scrub__bar {
  flex: 1;
  background: rgba(255,255,255,.16);
  border-radius: 1px;
  transition: background .25s,transform .2s;
  animation: _scrubIn .5s cubic-bezier(.16,1,.3,1) both;
}

.nuda-scrub__bar.is-played {
  background: #e4ff54;
}

.nuda-scrub__bars:hover .nuda-scrub__bar {
  transform: scaleY(.85);
}

.nuda-scrub__bar:hover {
  transform: scaleY(1.15) !important;
  background: #fafafa;
}

.nuda-scrub__time {
  display: flex;
  justify-content: space-between;
  color: #63636e;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
}

@keyframes _scrubIn {
  from {
    transform: scaleY(0);
    transform-origin: center;
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-scrub__bar {
    animation: none;
  }
}

How to use Waveform Scrubber

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 audio & waveforms components

← Browse all NudaUI components