Skip to content

Frequency Slider

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

Sliders & RangesHTMLCSSany framework
20Hz2.4 kHz20kHz

Copy into your project

HTML
<div class="nuda-freq">
  <div class="nuda-freq__lines">
    <!-- Generate N lines, add .is-on for active bars -->
    <span class="nuda-freq__line is-on" style="height:50%"></span>
    <!-- ... -->
  </div>
  <div class="nuda-freq__caption">
    <span>20Hz</span>
    <span class="nuda-freq__hz">2.4 kHz</span>
    <span>20kHz</span>
  </div>
</div>
CSS
.nuda-freq {
  width: 100%;
  max-width: 260px;
  padding: 12px 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
}

.nuda-freq__lines {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  margin-bottom: 8px;
}

.nuda-freq__line {
  flex: 1;
  background: rgba(255,255,255,.1);
  border-radius: 1px;
  transition: background .35s;
  animation: _freqIn .55s cubic-bezier(.16,1,.3,1) both;
}

.nuda-freq__line.is-on {
  background: #e4ff54;
  box-shadow: 0 0 4px rgba(228,255,84,.4);
}

.nuda-freq__caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #63636e;
  font-size: 10px;
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
}

.nuda-freq__hz {
  color: #e4ff54;
  font-weight: 700;
  font-size: 12px;
}

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

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

How to use Frequency Slider

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 sliders & ranges components

← Browse all NudaUI components