Slosh Button
buttonProA frosted glass button with real shallow-water physics inside: pointer drag, hover and clicks slosh and splash the water, breaking crests spray droplets, and the simulation sleeps when still.
Introductory price until 31 December 2026. €79 after that.
Preview
Live demo. The theme switches the demo itself.
Code
The code is locked
Slosh Button is part of Manniche UI Pro. A key unlocks the source of all 66 effects.
Buy · €49€49 · Introductory price until 31 December 2026. €79 after that.
- One-off payment
- One developer
- Sign in and create your key straight away
- No VAT (§ 19 UStG)
Have a key? Get the code with the CLI or MCP.
The key lives in MANNICHE_PRO_KEY, never in your code or a URL. How to set it up
npx shadcn@latest add @manniche-pro/slosh-buttonclaude mcp add --transport http manniche-ui https://mikkelmanniche.dk/api/mcp --header "Authorization: Bearer $MANNICHE_PRO_KEY"Props
SloshButtonProps
| Prop | Type | Default | What it does |
|---|---|---|---|
waterColor | string | 'var(--primary)' | Water colour. Any CSS colour, including var(--x). Defaults to the theme's --primary; re-read when the theme changes. |
fill | number | 0.3 | How full the glass is at rest, from 0.05 (a puddle) to 0.9 (nearly full). |
waterOpacity | number | 0.85 | Water opacity, from 0.2 to 1. |
tint | string | 'color-mix(in oklab, currentColor 6%, transparent)' | Glass tint: the fill behind the water. Any CSS colour or var(). Defaults to a faint wash of the text colour. |
frost | number | 0.5 | How frosted the glass looks, from 0 (clear) to 1 (milky). It adds a soft white sheen over the water. |
blur | number | 10 | Background blur behind the glass, in CSS pixels. 0 turns it off. |
borderColor | string | 'color-mix(in oklab, currentColor 18%, transparent)' | Border colour. Any CSS colour or var(). Defaults to a hairline of the text colour. |
borderWidth | number | 1 | Border width in CSS pixels. |
shadow | string | '0 10px 30px -12px color-mix(in oklab, currentColor 35%, transparent)' | Box shadow of the glass. Any CSS box-shadow value. |
pressScale | number | 0.97 | Scale while pressed, from 0.9 to 1. 1 turns the press feedback off. |
splash | number | 1 | How strongly the pointer and clicks disturb the water. 1 is natural, 0 makes it inert. |
spray | number | 1 | How readily crests tear off droplets. 0 turns the spray off, 1 is natural, 2 is stormy. |
viscosity | number | 0.4 | How quickly waves die down, from 0 (water that keeps sloshing) to 1 (syrup). |
meniscus | number | 3 | Height in px of the little climb the water makes against the glass walls. 0 gives a flat edge. |
ref | Ref<HTMLButtonElement> | – | Ref to the real <button>. |
Also takes every prop from Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>.
A11y
Keyboard
Enter and Space click the button and splash the liquid.
Screen reader
The liquid canvas is aria-hidden. The label is plain text in the button.
Reduced motion
Under reduced motion the surface is calm. Otherwise the simulation sleeps while the button is off screen.