Goo Melt Filter
A hidden SVG filter primitive that makes sibling shapes melt together like liquid: Gaussian blur smears them, a contrast-boosting color matrix snaps the blurred alpha back to a hard edge, and the source composites on top. Demoed twice — a radial menu whose action dots stretch and pinch off the hub like droplets, and tabs whose active pill drips into the content panel as a layoutId spring slides it between triggers.
Micro InteractionReactMotionTailwind CSSSolar Icons
CSSTailwind
Manual
Create a file and paste the following code into it.
goo-melt-filter.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
"use client";
import { useState } from "react";
import { AnimatePresence, motion } from "motion/react";
import { Bell, Bookmark, ChatRound, ClipboardAdd, Share, Star } from "@solar-icons/react";
import { cn } from "@/lib/cn";
/* ------------------------------------------------------------------ */
/* GooMeltFilter */
/* ------------------------------------------------------------------ */
interface GooMeltFilterProps {
/** Filter id referenced via `filter: url(#id)` [Optional, default: "gooey-filter"] */
id?: string;
/** Blur radius driving how far shapes melt together [Optional, default: 15] */
strength?: number;
}
/**
* A hidden SVG filter that makes sibling shapes melt together like liquid:
* a Gaussian blur smears them, a contrast-boosting color matrix snaps the
* blurred alpha back to a hard edge, and the source composites on top.
* Reference it from any element via `style={{ filter: "url(#id)" }}`.
* @param {string} id - Filter id [Optional, default: "gooey-filter"]
* @param {number} strength - Blur radius [Optional, default: 15]
*/
export function GooMeltFilter({ id = "gooey-filter", strength = 15 }: GooMeltFilterProps) {
return (
<svg className="absolute hidden" aria-hidden>
<defs>
<filter id={id}>
<feGaussianBlur in="SourceGraphic" stdDeviation={strength} result="blur" />
<feColorMatrix
in="blur"
type="matrix"
values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9"
result="goo"
/>
<feComposite in="SourceGraphic" in2="goo" operator="atop" />
</filter>
</defs>
</svg>
);
}
/* ------------------------------------------------------------------ */
/* Radial gooey menu */
/* ------------------------------------------------------------------ */
const ACTIONS: { label: string; icon: Icon; angle: number }[] = [
{ label: "Favorite", icon: Star, angle: -150 },
{ label: "Share", icon: Share, angle: -90 },
{ label: "Comment", icon: ChatRound, angle: -30 },
{ label: "Save", icon: Bookmark, angle: 30 },
{ label: "Notify", icon: Bell, angle: 90 },
{ label: "Add to list", icon: ClipboardAdd, angle: 150 },
];
const RADIUS = 96;
const EASE = [0.22, 1, 0.36, 1] as const;
/**
* Six action dots bloom out of a central button; the gooey filter makes them
* stretch and pinch off the hub like droplets. The filtered layer holds only
* the solid shapes — icons live on an unfiltered twin layer so the goo never
* smears them.
*/
export function RadialGooeyMenu() {
const [isOpen, setIsOpen] = useState(false);
const spoke = (index: number, open: boolean) => ({
duration: 0.8,
ease: EASE,
delay: open ? index * 0.08 : (ACTIONS.length - 1 - index) * 0.05,
});
return (
<div className="relative flex size-[300px] shrink-0 items-center justify-center">
{/* Filtered layer: solid dots only */}
<div
className="absolute inset-0 flex items-center justify-center"
style={{ filter: "url(#gooey-radial-menu)" }}
>
{ACTIONS.map((action, index) => (
<motion.div
key={action.label}
className="absolute left-1/2 top-1/2"
style={{ transformOrigin: "center center" }}
animate={{ rotate: isOpen ? action.angle : action.angle + 90 }}
transition={spoke(index, isOpen)}
>
<motion.div
className="absolute left-1/2 top-1/2 size-12 -translate-x-1/2 -translate-y-1/2 rounded-full bg-zinc-900 dark:bg-zinc-100"
animate={{ y: isOpen ? -RADIUS : 0, scale: isOpen ? 1 : 0.82 }}
transition={spoke(index, isOpen)}
/>
</motion.div>
))}
<div className="size-14 rounded-full bg-zinc-900 dark:bg-zinc-100" />
</div>
{/* Unfiltered layer: icons + hit targets */}
<div className="absolute inset-0">
{ACTIONS.map((action, index) => (
<motion.div
key={action.label}
className="absolute left-1/2 top-1/2"
style={{ transformOrigin: "center center" }}
animate={{ rotate: isOpen ? action.angle : action.angle + 90 }}
transition={spoke(index, isOpen)}
>
<motion.div
className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
animate={{
y: isOpen ? -RADIUS : 0,
scale: isOpen ? 1 : 0.7,
opacity: isOpen ? 1 : 0,
}}
transition={{
duration: 0.72,
ease: EASE,
delay: isOpen ? 0.06 + index * 0.08 : 0,
opacity: { duration: 0.18, delay: isOpen ? 0.14 + index * 0.08 : 0 },
}}
>
<motion.button
type="button"
aria-label={action.label}
onClick={() => setIsOpen(false)}
className="flex size-12 items-center justify-center rounded-full text-white dark:text-zinc-900"
whileTap={isOpen ? { scale: 0.96 } : undefined}
>
{/* Counter-rotate so the glyph stays upright on the spoke */}
<motion.div
animate={{
rotate: isOpen ? -(action.angle + 360) : -(action.angle + 90),
}}
transition={spoke(index, isOpen)}
>
<action.icon size={20} weight="Bold" />
</motion.div>
</motion.button>
</motion.div>
</motion.div>
))}
<motion.button
type="button"
onClick={() => setIsOpen((v) => !v)}
aria-label={isOpen ? "Close radial menu" : "Open radial menu"}
className="absolute left-1/2 top-1/2 z-10 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full text-white transition-transform active:scale-[0.96] dark:text-zinc-900"
>
<motion.svg
viewBox="0 0 24 24"
className="size-6"
fill="none"
stroke="currentColor"
strokeWidth={2.2}
strokeLinecap="round"
animate={{ rotate: isOpen ? 45 : 0, scale: isOpen ? 0.92 : 1 }}
transition={{ duration: 0.38, ease: EASE }}
>
<path d="M12 5v14M5 12h14" />
</motion.svg>
</motion.button>
</div>
</div>
);
}
/* ------------------------------------------------------------------ */
/* Gooey tabs */
/* ------------------------------------------------------------------ */
const TAB_CONTENT = [
{ value: "2024", files: ["learning-to-meditate.md", "spring-garden-plans.md", "travel-wishlist.md", "new-side-projects.md"] },
{ value: "2023", files: ["year-in-review.md", "marathon-training-log.md", "recipe-collection.md", "book-reflections.md"] },
{ value: "2022", files: ["moving-to-a-new-city.md", "starting-a-blog.md", "photography-basics.md", "first-shipped-app.md"] },
];
/**
* The active tab's pill and the content panel are drawn as one filtered
* shape, so the pill drips into the panel and the seam melts shut while a
* layoutId spring slides it between tabs. Text renders on an unfiltered
* layer above.
*/
export function GooeyTabs() {
const [activeTab, setActiveTab] = useState(TAB_CONTENT[0].value);
const active = TAB_CONTENT.find((t) => t.value === activeTab) ?? TAB_CONTENT[0];
return (
<div className="relative w-full max-w-md p-2">
{/* Filtered layer: tab pill + panel silhouette */}
<div
className="pointer-events-none absolute inset-0 p-2"
style={{ filter: "url(#gooey-tabs-panel)" }}
>
<div className="flex w-full">
{TAB_CONTENT.map((tab) => (
<div key={tab.value} className="relative h-10 flex-1">
{activeTab === tab.value && (
<motion.div
layoutId="active-gooey-tab"
className="absolute inset-0 rounded-t-2xl bg-zinc-900 dark:bg-zinc-100"
transition={{ type: "spring", stiffness: 320, damping: 30 }}
/>
)}
</div>
))}
</div>
<div className="h-[204px] w-full rounded-b-3xl rounded-tr-3xl bg-zinc-900 dark:bg-zinc-100" />
</div>
{/* Unfiltered layer: labels + file list */}
<div className="relative z-10">
<div className="flex w-full">
{TAB_CONTENT.map((tab) => (
<button
key={tab.value}
type="button"
onClick={() => setActiveTab(tab.value)}
className={cn(
"flex h-10 flex-1 items-center justify-center text-sm font-medium transition-colors active:scale-[0.98]",
activeTab === tab.value
? "text-white dark:text-zinc-900"
: "text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100",
)}
>
{tab.value}
</button>
))}
</div>
<div className="h-[204px] overflow-hidden px-6 py-4">
<AnimatePresence mode="popLayout" initial={false}>
<motion.ul
key={active.value}
initial={{ opacity: 0, y: 40, filter: "blur(10px)" }}
animate={{ opacity: 1, y: 0, filter: "blur(0px)" }}
exit={{ opacity: 0, y: -40, filter: "blur(10px)" }}
transition={{ duration: 0.2, ease: "easeOut" }}
>
{active.files.map((file) => (
<li
key={file}
className="border-b border-white/15 py-2 font-mono text-[13px] text-white last:border-0 dark:border-zinc-900/15 dark:text-zinc-900"
>
{file}
</li>
))}
</motion.ul>
</AnimatePresence>
</div>
</div>
</div>
);
}
Update the import paths to match your project setup.
Similar components
Install via CLI
Resource details
PublishedJuly 17, 2026
CategoryMicro Interaction
ReactMotionTailwind CSSSolar Icons
Install via CLI
Resource details
PublishedJuly 17, 2026
CategoryMicro Interaction
ReactMotionTailwind CSSSolar Icons