Gooey Filter
A filter component that creates a gooey effect on the background for fluid tab panels and rounded-at-all-corners interfaces.
Installation
bunx --bun shadcn@latest add "https://quatadahnasdami.xyz/r/gooey-filter.json"
Usage
import { GooeyFilter, GooeyTabPanel } from "@/components/gooey-filter";const tabs = [
{
id: "2024",
label: "2024",
items: ["learning-to-meditate.md", "spring-garden-plans.md"],
},
{
id: "2023",
label: "2023",
items: ["year-in-review.md", "photography-log.md"],
},
];
<GooeyTabPanel tabs={tabs} defaultTab="2024" />Filter only
Use GooeyFilter on any container that should merge adjacent shapes:
<GooeyFilter id="goo" strength={12} />
<div style={{ filter: "url(#goo)" }} className="flex gap-4">
<div className="size-20 rounded-full bg-rose-500" />
<div className="size-20 rounded-full bg-emerald-500" />
</div>API Reference
GooeyFilter
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | "goo" | Filter id referenced by url(#id). |
strength | number | 10 | Goo intensity — higher values merge more. |
className | string | - | Classes for the hidden filter element. |
GooeyTabPanel
| Prop | Type | Default | Description |
|---|---|---|---|
tabs | GooeyTabItem[] | - | Tab definitions with labels and list content. |
defaultTab | string | - | Initially selected tab id. |
enabled | boolean | true | Toggle the goo filter on or off. |
strength | number | 10 | Passed through to GooeyFilter. |
filterId | string | - | Custom filter id when using multiple instances. |
onTabChange | (id) => void | - | Fires when the active tab changes. |
className | string | - | Root container classes. |
panelClassName | string | - | Background surface classes for tab and panel. |
GooeyTabItem
| Prop | Type | Description |
|---|---|---|
id | string | Unique tab identifier. |
label | string | Tab button label. |
items | string[] | Simple list rows rendered inside the panel. |
content | React.ReactNode | Custom panel content instead of a list. |
Browser support
The goo effect relies on filters applied through CSS. It works in Chromium and Firefox. Safari support is limited — use the enabled prop to fall back to a standard rounded panel when needed.
TABLE OF CONTENTS