Skip to content

Vertical Rail

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

Sidebars & DocksHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-rail">
  <button class="nuda-rail__item is-active" type="button">
    Dashboard
    <span class="nuda-rail__indicator"></span>
  </button>
  <button class="nuda-rail__item" type="button">Analytics</button>
  <button class="nuda-rail__item" type="button">Customers</button>
  <button class="nuda-rail__item" type="button">Invoices</button>
  <button class="nuda-rail__item" type="button">Settings</button>
</div>
CSS
.nuda-rail {
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  width: 160px;
}

.nuda-rail__item {
  position: relative;
  background: transparent;
  border: 0;
  color: #a0a0a8;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s,color .2s,padding-left .25s ease;
}

.nuda-rail__item:hover {
  background: rgba(255,255,255,.04);
  color: #fafafa;
  padding-left: 18px;
}

.nuda-rail__indicator {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #e4ff54;
  border-radius: 99px;
  transition: height .35s cubic-bezier(.16,1,.3,1);
}

.nuda-rail__item.is-active {
  color: #e4ff54;
  background: rgba(228,255,84,.06);
}

.nuda-rail__item.is-active .nuda-rail__indicator {
  height: 60%;
}

How to use Vertical Rail

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 sidebars & docks components

← Browse all NudaUI components