Skip to content

Two-column Setting

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

Settings & PreferencesHTMLCSSany framework
Default workspace
Opened when you launch the app.

Copy into your project

HTML
<div class="nuda-two-col">
  <div class="nuda-two-col__label">
    <div class="nuda-two-col__name">Default workspace</div>
    <div class="nuda-two-col__hint">Opened when you launch the app.</div>
  </div>
  <div class="nuda-two-col__control">
    <select>
      <option value="nuda-ui" selected>Nuda UI</option>
      <option value="personal">Personal</option>
      <option value="acme">Acme Inc.</option>
    </select>
    <svg viewBox="0 0 12 12" aria-hidden="true">
      <path d="m3 4.5 3 3 3-3" fill="none" stroke="currentColor"
        stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
    </svg>
  </div>
</div>
CSS
/* Two-column Setting
   Label on the left, control on the right.
   Customize: --row-border, --control-bg */

.nuda-two-col {
  --row-border: rgba(255, 255, 255, 0.06);
  --control-bg: #0c0c10;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--row-border);
  width: 100%;
  max-width: 560px;
}

.nuda-two-col__label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.nuda-two-col__name {
  color: #fafafa;
  font-size: 0.875rem;
  font-weight: 500;
}

.nuda-two-col__hint {
  color: #a0a0a8;
  font-size: 0.75rem;
  line-height: 1.4;
}

.nuda-two-col__control {
  position: relative;
  display: flex;
  align-items: center;
}

.nuda-two-col__control select {
  appearance: none;
  background: var(--control-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fafafa;
  font-size: 0.8125rem;
  font-family: inherit;
  padding: 0.5rem 2rem 0.5rem 0.875rem;
  border-radius: 8px;
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.2s ease;
}

.nuda-two-col__control select:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.nuda-two-col__control select:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-two-col__control svg {
  position: absolute;
  right: 0.625rem;
  width: 12px;
  height: 12px;
  color: #a0a0a8;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .nuda-two-col__control select {
    transition: none;
  }
}

How to use Two-column Setting

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 settings & preferences components

← Browse all NudaUI components