Bootstrap 5 Blob Hover Buttons (Liquid Fill)
A set of outline buttons in three sizes, on light and brand surfaces, that fill with a liquid blob animation on hover and keyboard focus.
<section class="wdw-stage">
<div class="container" style="max-width:960px">
<div class="text-center mb-4 mb-lg-5">
<span class="wdw-eyebrow">Buttons</span>
<h2 class="wdw-heading display-6 mt-1 mb-2">Liquid blob hover buttons</h2>
<p class="wdw-muted mb-0">Hover or focus a button and the fill pours in like liquid.</p>
</div>
<div class="row g-4">
<div class="col-md-6">
<div class="wdw-card p-4 p-lg-5 h-100">
<p class="wdw-eyebrow mb-4">On light surfaces</p>
<div class="d-flex flex-column align-items-center gap-4">
<button type="button" class="wdw-blob btn btn-outline-primary rounded-pill is-demo">Get started</button>
<button type="button" class="wdw-blob wdw-blob--solid btn btn-primary rounded-pill">Start your free trial</button>
<button type="button" class="wdw-blob wdw-blob--ghost btn rounded-pill">Learn more</button>
<button type="button" class="wdw-blob btn btn-outline-primary rounded-pill">View pricing <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="wdw-card wdw-aurora border-0 p-4 p-lg-5 h-100">
<p class="wdw-eyebrow text-white-50 mb-4">On brand panels</p>
<div class="d-flex flex-column align-items-center gap-4">
<button type="button" class="wdw-blob btn btn-outline-light rounded-pill is-demo wdw-blob--light">Get started</button>
<button type="button" class="wdw-blob wdw-blob--solid btn btn-light rounded-pill wdw-blob--light">Start your free trial</button>
<button type="button" class="wdw-blob wdw-blob--ghost btn rounded-pill wdw-blob--light">Learn more</button>
<button type="button" class="wdw-blob btn btn-outline-light rounded-pill wdw-blob--light">View pricing <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button>
</div>
</div>
</div>
</div>
</div>
<!-- Goo filter: when this SVG is missing the buttons fall back to plain, unfiltered blobs. -->
<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false">
<defs>
<filter id="wdw-goo">
<feGaussianBlur in="SourceGraphic" result="blur" stdDeviation="8"/>
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 21 -7" result="goo"/>
<feBlend in2="goo" in="SourceGraphic"/>
</filter>
</defs>
</svg>
</section>
/* Web Designer Wall library style — shared base for every Bootstrap 5 snippet.
Indigo accent, Plus Jakarta Sans, soft cards, pill buttons. Works in light and dark. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root,
[data-bs-theme="light"] {
--wdw-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bs-body-font-family: var(--wdw-font);
--bs-primary: #4f46e5;
--bs-primary-rgb: 79, 70, 229;
--bs-primary-text-emphasis: #3730a3;
--bs-primary-bg-subtle: #eef2ff;
--bs-primary-border-subtle: #c7d2fe;
--bs-link-color: #4f46e5;
--bs-link-color-rgb: 79, 70, 229;
--bs-link-hover-color: #4338ca;
--bs-link-hover-color-rgb: 67, 56, 202;
--bs-focus-ring-color: rgba(79, 70, 229, 0.25);
--bs-border-radius: 0.75rem;
--bs-border-radius-lg: 1rem;
--bs-border-radius-xl: 1.25rem;
--wdw-radius-card: 1.25rem;
--wdw-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 40px -16px rgba(16, 24, 40, 0.22);
--wdw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -4px rgba(16, 24, 40, 0.12);
--wdw-stage: #f5f6fb;
}
[data-bs-theme="dark"] {
--bs-primary: #818cf8;
--bs-primary-rgb: 129, 140, 248;
--bs-primary-text-emphasis: #c7d2fe;
--bs-primary-bg-subtle: rgba(129, 140, 248, 0.14);
--bs-primary-border-subtle: rgba(129, 140, 248, 0.35);
--bs-link-color: #a5b4fc;
--bs-link-color-rgb: 165, 180, 252;
--bs-link-hover-color: #c7d2fe;
--bs-link-hover-color-rgb: 199, 210, 254;
--bs-focus-ring-color: rgba(129, 140, 248, 0.35);
--wdw-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
--wdw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
--wdw-stage: #0f1117;
}
body { font-family: var(--wdw-font); -webkit-font-smoothing: antialiased; }
/* Bootstrap compiles its blue into these components; point them at the accent. */
.btn-primary {
--bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
--bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0f1117; --bs-btn-hover-bg: #a5b4fc; --bs-btn-hover-border-color: #a5b4fc; --bs-btn-hover-color: #0f1117; --bs-btn-active-color: #0f1117; }
.btn-outline-primary {
--bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn { --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.form-control, .form-select { min-height: 44px; border-radius: .75rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.nav { --bs-nav-link-color: var(--bs-secondary-color); --bs-nav-link-hover-color: var(--bs-emphasis-color); }
.pagination { --bs-pagination-active-bg: var(--bs-primary); --bs-pagination-active-border-color: var(--bs-primary); --bs-pagination-color: var(--bs-body-color); --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.list-group { --bs-list-group-active-bg: var(--bs-primary); --bs-list-group-active-border-color: var(--bs-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .875rem; box-shadow: var(--wdw-shadow-sm); }
.accordion { --bs-accordion-active-bg: var(--bs-primary-bg-subtle); --bs-accordion-active-color: var(--bs-primary-text-emphasis); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.badge { font-weight: 600; }
/* Library building blocks — use these instead of re-inventing them per snippet. */
.wdw-stage { min-height: 100vh; display: flex; align-items: center; background: var(--wdw-stage); padding-block: 3rem; }
.wdw-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--wdw-radius-card); box-shadow: var(--wdw-shadow); }
.wdw-card-sm { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: var(--wdw-shadow-sm); }
.wdw-aurora { position: relative; color: #fff; background: radial-gradient(60% 55% at 100% 0, #818cf8 0, transparent 70%), radial-gradient(65% 60% at 0 100%, #ec4899 0, transparent 65%), #1e1b4b; }
.wdw-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); }
.wdw-heading { font-weight: 800; letter-spacing: -.02em; color: var(--bs-emphasis-color); }
.wdw-muted { color: var(--bs-secondary-color); }
.wdw-icon { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: .875rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
/* Component */
.wdw-blob { --blob: var(--bs-primary); --blob-ink: var(--bs-primary); --blob-hover-ink: var(--bs-body-bg); --rest-bg: transparent; position: relative; z-index: 0; isolation: isolate; padding-inline: 2.25rem; min-height: 52px; border-width: 2px; --bs-btn-color: var(--blob-ink); --bs-btn-hover-color: var(--blob-hover-ink); --bs-btn-active-color: var(--blob-hover-ink); --bs-btn-hover-bg: var(--rest-bg); --bs-btn-active-bg: var(--rest-bg); letter-spacing: .01em; transition: color .4s .05s, box-shadow .3s; }
.wdw-blob:hover, .wdw-blob:focus-visible, .wdw-blob:active, .wdw-blob.is-demo { color: var(--blob-hover-ink); }
.wdw-blob:focus-visible { outline: 3px solid var(--bs-focus-ring-color); outline-offset: 3px; box-shadow: none; }
.wdw-blob:hover, .wdw-blob.is-demo { box-shadow: 0 10px 24px -10px var(--blob); }
.wdw-blob__inner { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; }
.wdw-blob__blobs { position: relative; display: block; height: 100%; }
.wdw-goo .wdw-blob__blobs { filter: url("#wdw-goo"); }
.wdw-blob__blobs span { position: absolute; top: 2px; width: 26%; height: 100%; border-radius: 100%; background: var(--blob); transform: translate3d(0, 150%, 0) scale(1.7); transition: transform .5s; }
.wdw-blob__blobs span:nth-child(1) { left: 0; transition-delay: 0s; }
.wdw-blob__blobs span:nth-child(2) { left: 25%; transition-delay: .08s; }
.wdw-blob__blobs span:nth-child(3) { left: 50%; transition-delay: .16s; }
.wdw-blob__blobs span:nth-child(4) { left: 75%; transition-delay: .24s; }
.wdw-blob:hover .wdw-blob__blobs span, .wdw-blob:focus-visible .wdw-blob__blobs span, .wdw-blob.is-demo .wdw-blob__blobs span { transform: translate3d(0, 0, 0) scale(1.7); }
/* Filled: solid at rest, a deeper liquid pours over it */
.wdw-blob--solid { --blob: var(--bs-primary-text-emphasis); --blob-ink: var(--bs-btn-color); --rest-bg: var(--bs-primary); --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary-text-emphasis); --bs-btn-active-border-color: var(--bs-primary-text-emphasis); --bs-btn-disabled-color: #fff; color: #fff; }
[data-bs-theme="dark"] .wdw-blob--solid { --blob-ink: #0f1117; }
.wdw-blob--solid:hover, .wdw-blob--solid:focus-visible, .wdw-blob--solid:active, .wdw-blob--solid.is-demo { color: #fff; }
[data-bs-theme="dark"] .wdw-blob--solid:hover, [data-bs-theme="dark"] .wdw-blob--solid:focus-visible { color: #0f1117; }
/* Ghost: no outline, tinted liquid */
.wdw-blob--ghost { --blob: var(--bs-primary-bg-subtle); --blob-ink: var(--bs-primary); --blob-hover-ink: var(--bs-primary-text-emphasis); --bs-btn-color: var(--bs-primary); border-color: transparent; text-decoration: none; }
.wdw-blob--ghost:hover { box-shadow: none; border-color: transparent; }
.wdw-blob--light { --blob: #fff; --blob-ink: #fff; --blob-hover-ink: #1e1b4b; --bs-btn-color: #fff; --bs-btn-border-color: #fff; --bs-btn-hover-border-color: #fff; --bs-btn-active-border-color: #fff; }
.wdw-blob--light:focus-visible { outline-color: rgba(255,255,255,.6); }
.wdw-blob--light.wdw-blob--solid { --blob: #1e1b4b; --blob-ink: #1e1b4b; --blob-hover-ink: #fff; --rest-bg: #fff; --bs-btn-bg: #fff; --bs-btn-color: #1e1b4b; color: #1e1b4b; }
.wdw-blob--light.wdw-blob--solid:hover, .wdw-blob--light.wdw-blob--solid:focus-visible, .wdw-blob--light.wdw-blob--solid.is-demo { color: #fff; }
.wdw-blob--light.wdw-blob--ghost { --blob: rgba(255,255,255,.2); --blob-hover-ink: #fff; --bs-btn-color: #fff; border-color: transparent; }
.wdw-blob--light.wdw-blob--ghost:hover, .wdw-blob--light.wdw-blob--ghost:focus-visible { color: #fff; }
.wdw-blob--light.is-demo { color: #1e1b4b; }
@media (prefers-reduced-motion: reduce) { .wdw-blob__blobs span, .wdw-blob { transition-duration: .01s; transition-delay: 0s !important; } }
function initBlobButtons() {
var buttons = document.querySelectorAll('.wdw-blob');
if (!buttons.length) return;
// The goo filter is optional: without its inline SVG the blobs still fill the button, just not gooey.
if (document.getElementById('wdw-goo')) document.documentElement.classList.add('wdw-goo');
buttons.forEach(function (btn) {
if (btn.querySelector('.wdw-blob__inner')) return;
var inner = document.createElement('span');
inner.className = 'wdw-blob__inner';
inner.setAttribute('aria-hidden', 'true');
inner.innerHTML = '<span class="wdw-blob__blobs"><span></span><span></span><span></span><span></span></span>';
btn.appendChild(inner);
});
}
initBlobButtons();
Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.