Blobs & Glassmorphism

Modern backgrounds with animated blobs, plus a frosted-glass effect ideal for overlays on a colorful background.

Blobs & Glassmorphism

The .bg-blobs class generates animated, blurred blobs in the background, and .bg-glass creates a frosted-glass effect ideal for overlays.

Glassmorphism

The background behind this card is dynamically blurred.

<!-- Container with animated blobs -->
<div class="bg-blobs">

  <!-- Card with a frosted-glass effect -->
  <div class="card bg-glass">
    <h3>Glassmorphism</h3>
  </div>

  <!-- Dark variant -->
  <div class="card bg-glass-dark text-white">
    <h3>Dark Glass</h3>
  </div>

</div>

Dark variant: .bg-blobs-deep

The background is dark always - even in the light theme - so white text on it works without checking which theme is active. The same trick as in .navbar-pill. Swap the color via style="--blobs-deep-bg: #123".

Always Dark Background

White text is legible in both themes.

<div class="bg-blobs bg-blobs-deep">
  <div class="card bg-glass text-white">…</div>
</div>

<!-- Custom background color -->
<div class="bg-blobs bg-blobs-deep" style="--blobs-deep-bg: #1a103d">…</div>

Custom Colors and Speed

The component is controlled by variables, not classes - color and timing are continuous values, so any class would be an arbitrary point on the scale. Just add style to the container.

Custom Palette

Purple and pink, twice as fast.

<div class="bg-blobs bg-blobs-deep" style="
       --blobs-deep-bg: #1a103d;
       --blob-1: rgba(168, 85, 247, 0.75);
       --blob-2: rgba(236, 72, 153, 0.6);
       --blob-speed: 5s;">
  <div class="card bg-glass text-white">…</div>
</div>
Variable Default Controls
--blob-1 primary, 50% opacity The color of the blob in the top-left corner.
--blob-2 info, 40% opacity The color of the blob in the bottom-right corner.
--blob-speed 7s The cycle of the first blob. The second one uses ×1.3 of it, so a single value speeds up both while keeping their cycles offset.
--blobs-deep-bg #0F172A The background of the .bg-blobs-deep variant.