Skip to content

Edit Profile Button

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

Profile HeadersHTMLCSSany framework

Copy into your project

HTML
<button class="nuda-edit-btn" type="button" aria-label="Edit profile">
  <span class="nuda-edit-btn__icon" aria-hidden="true">
    <!-- pencil SVG -->
  </span>
  <span class="nuda-edit-btn__label">Edit Profile</span>
</button>
CSS
/* Edit Profile Button
   Pill button with a fill-from-bottom hover.
   Customize: --c (accent color) */

.nuda-edit-btn {
  --c: #e4ff54;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fafafa;
  font: 600 0.85rem/1 system-ui, sans-serif;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.25s, color 0.25s;
}

.nuda-edit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
  z-index: 0;
}

.nuda-edit-btn__icon,
.nuda-edit-btn__label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}

.nuda-edit-btn:hover {
  border-color: var(--c);
  color: #09090b;
}

.nuda-edit-btn:hover::before { transform: translateY(0); }

.nuda-edit-btn:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
}

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

How to use Edit Profile Button

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 profile headers components

← Browse all NudaUI components