SVG Gooey Filter
Hover over these elements. They use an invisible SVG filter to physically merge and bridge together like liquid slime.
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>
);
}