Skip to content

Workspace Picker

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

Login & AuthHTMLCSSany framework
Choose a workspace

Copy into your project

HTML
<div class="nuda-au2-workspace-picker">
  <div class="nuda-au2-workspace-picker__title">Choose a workspace</div>
  <div class="nuda-au2-workspace-picker__list">
    <button class="nuda-au2-workspace-picker__item" type="button">
      <span class="nuda-au2-workspace-picker__avatar" aria-hidden="true">A</span>
      <span class="nuda-au2-workspace-picker__meta">
        <span class="nuda-au2-workspace-picker__name">Acme Inc</span>
        <span class="nuda-au2-workspace-picker__count">12 members</span>
      </span>
    </button>
    <button class="nuda-au2-workspace-picker__item" type="button">
      <span class="nuda-au2-workspace-picker__avatar" aria-hidden="true">B</span>
      <span class="nuda-au2-workspace-picker__meta">
        <span class="nuda-au2-workspace-picker__name">Bright Labs</span>
        <span class="nuda-au2-workspace-picker__count">4 members</span>
      </span>
    </button>
  </div>
</div>
CSS
.nuda-au2-workspace-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  width: 100%;
  max-width: 290px;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
}

.nuda-au2-workspace-picker__title {
  color: #fafafa;
  font-size: 13px;
  font-weight: 600;
}

.nuda-au2-workspace-picker__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nuda-au2-workspace-picker__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  color: #e5e5e5;
  cursor: pointer;
  text-align: left;
  opacity: 0;
  transform: translateX(-6px);
  animation: nuda-au2-workspace-picker-in .45s cubic-bezier(.16,1,.3,1) both;
  transition: border-color .2s,transform .2s;
}

.nuda-au2-workspace-picker__item:nth-child(2) {
  animation-delay: .1s;
}

.nuda-au2-workspace-picker__item:hover {
  border-color: rgba(228,255,84,.35);
  transform: translateX(2px);
}

.nuda-au2-workspace-picker__item:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-au2-workspace-picker__avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(228,255,84,.14);
  color: #e4ff54;
  font-size: 12px;
  font-weight: 700;
}

.nuda-au2-workspace-picker__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.nuda-au2-workspace-picker__name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nuda-au2-workspace-picker__count {
  color: #777;
  font-size: 10.5px;
}

@keyframes nuda-au2-workspace-picker-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-au2-workspace-picker__item {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

How to use Workspace Picker

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 login & auth components

← Browse all NudaUI components