Liking cljdoc? Tell your friends :D

x-gaussian-blur

A decorative background component that generates animated, blurred color blobs — producing a soft, dreamy, living gradient effect. Colored shapes float and drift inside a container with a gaussian blur filter applied, creating an ambient backdrop. Content can be layered on top via the default slot.

Tag

<x-gaussian-blur></x-gaussian-blur>

Attributes

AttributeTypeDefaultDescription
colorsstring"#6366f1, #ec4899, #14b8a6, #f59e0b"Comma-separated CSS color values for the blobs. Colors cycle when blob count exceeds the number of colors.
blurstring"60"Blur radius in pixels applied to the backdrop via filter: blur().
speedstring"medium"Animation speed. Presets: slow (18s), medium (10s), fast (5s). Or a raw number in seconds (e.g. "25").
countstring"5"Number of blobs to render. Clamped to 1–12.
sizestring"medium"Blob size relative to container. Presets: small (30%), medium (50%), large (70%). Or a percentage number (e.g. "60").
opacitystring"0.7"Opacity of the blur layer (0–1).
animationstring"float"Animation type: float (drifting movement), pulse (scale breathing + drift), none.
blendstring"normal"CSS mix-blend-mode for the blob layer: normal, multiply, screen, overlay, soft-light.
pausedbooleanabsentBoolean attribute. When present, pauses all animations.

Properties

PropertyJS TypeReflects Attribute
colorsstringcolors
blurstringblur
speedstringspeed
countstringcount
sizestringsize
opacitystringopacity
animationstringanimation
blendstringblend
pausedbooleanpaused

Events

None. This is a purely decorative component.

Slots

SlotDescription
defaultContent layered on top of the blur background.

Slot example

<x-gaussian-blur style="height: 400px;">
  <div style="display:flex; align-items:center; justify-content:center; height:100%;">
    <h1>Hello World</h1>
  </div>
</x-gaussian-blur>

Parts

PartDescription
backdropThe container div holding the blurred blobs.
contentThe slot wrapper sitting above the blur layer.

CSS Custom Properties

Layout

PropertyDefaultDescription
--x-gaussian-blur-bgtransparentBackground color behind the blobs.
--x-gaussian-blur-z-index0Z-index of the blur layer.
--x-gaussian-blur-border-radius0Border-radius of the host container.

Accessibility

  • The backdrop div has aria-hidden="true" (always — blobs are purely decorative).
  • When no slotted content is present, the host gets role="presentation" and aria-hidden="true".
  • When slotted content is detected, those attributes are removed so the content remains accessible.
  • No interactive elements. No tabindex.
  • Animations respect @media (prefers-reduced-motion: reduce).

Blob Layout

Blob positions are computed deterministically from the blob index using a golden-angle distribution. The same attribute values always produce the same visual output — no randomness is involved.

Each blob gets a slight size variation (70–130% of the base size) and staggered animation timing for an organic, non-synchronized feel.

Examples

Basic usage

<x-gaussian-blur style="height: 300px;"></x-gaussian-blur>

Custom colors and blur

<x-gaussian-blur
  colors="#ff6b6b, #4ecdc4, #45b7d1, #f7dc6f"
  blur="80"
  speed="slow"
  style="height: 400px;">
</x-gaussian-blur>

With content overlay

<x-gaussian-blur colors="#667eea, #764ba2" blur="60" style="height: 500px;">
  <div style="display:flex; align-items:center; justify-content:center; height:100%; color:white;">
    <h1>Welcome</h1>
  </div>
</x-gaussian-blur>

Paused animation

<x-gaussian-blur paused style="height: 300px;"></x-gaussian-blur>

Pulse animation with blend mode

<x-gaussian-blur animation="pulse" blend="screen" style="height: 300px;"></x-gaussian-blur>

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close