Skip to content

Account Section

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

Settings & PreferencesHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-account">
  <div class="nuda-account__avatar" aria-hidden="true">NU</div>
  <div class="nuda-account__info">
    <div class="nuda-account__name">Nuda UI</div>
    <div class="nuda-account__email">hello@nudaui.dev</div>
  </div>
  <button type="button" class="nuda-account__action">Change</button>
</div>
CSS
/* Account Section
   Avatar + name + email with a change link.
   Customize: --accent, --card-bg */

.nuda-account {
  --accent: #e4ff54;
  --card-bg: #0c0c10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
}

.nuda-account__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a8c93f);
  color: #09090b;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.nuda-account__info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  flex: 1;
}

.nuda-account__name {
  color: #fafafa;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nuda-account__email {
  color: #a0a0a8;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nuda-account__action {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fafafa;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nuda-account__action:hover {
  background: #111114;
  border-color: rgba(255, 255, 255, 0.18);
}

.nuda-account__action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

How to use Account Section

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