Kinetic UI
Back to Introduction
Media

SVG Gooey Filter

A mathematical SVG filter that causes overlapping DOM elements to stretch, bridge, and merge together like liquid slime.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add svg-gooey-filter
SVG Gooey Filter

SVG Gooey Filter

Hover over these elements. They use an invisible SVG filter to physically merge and bridge together like liquid slime.

Hover Me

Installation

npx kinetic-ui-cli@latest add svg-gooey-filter

How It Works

The "Gooey" effect is a classic vector mathematics trick. The SvgGooeyFilter component renders an invisible <svg> block containing a complex <filter>. Inside this filter, it applies an <feGaussianBlur> to soften the edges of all child elements. Then, it immediately pipes that blurred output into an <feColorMatrix> that drastically increases the contrast of the alpha channel. This math forces the soft, overlapping blurred edges to become sharp again, creating the illusion of a physical liquid bridge snapping between the shapes as they get close to one another!

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { SvgGooeyFilter } from "@/components/creative/svg-gooey-filter";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { SvgGooeyFilter } from "@/components/creative/svg-gooey-filter";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <SvgGooeyFilter
        blur{10}
        contrast{10}
      >
        <div>Content goes here</div>
      </SvgGooeyFilter>
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.