Skip to content

Liquid Fill Hover

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

ButtonsHTMLCSSany framework

Copy into your project

HTML
<button class="nuda-btn-liquid-fill">
  <span class="nuda-btn-liquid-fill__label">Liquid Fill</span>
</button>
CSS
/* Liquid Fill Hover — a curved liquid surface rises to fill the button. */
.nuda-btn-liquid-fill {
  position: relative;
  padding: 12px 30px;
  background: transparent;
  color: #e4ff54;
  border: 1px solid #e4ff54;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s ease;
}

.nuda-btn-liquid-fill::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: #e4ff54;
  /* curved top edge gives the "liquid" feel */
  border-radius: 42% 42% 0 0 / 14px 14px 0 0;
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}

.nuda-btn-liquid-fill:hover { color: #09090b; }
.nuda-btn-liquid-fill:hover::before { transform: translateY(0); }

.nuda-btn-liquid-fill__label {
  position: relative;
  z-index: 1;
}

.nuda-btn-liquid-fill:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 3px;
}

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

How to use Liquid Fill Hover

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 buttons components

← Browse all NudaUI components