
macOS Floating Dock
A magnetic dock where icons inflate near the cursor and push their siblings aside.
Frosted glass that bends the page at its edge, with a rim that catches the light.
Liquid Glass Button is a React and Tailwind CSS glass button in the style of Apple's Liquid Glass, in Next.js or any React app, with no dependencies. A frosted body keeps the label readable on any photo, while a lens map sized to the button bends the page behind its rim through an SVG displacement filter. A rim lit from the top left and stacked soft shadows give it depth. On hover the lens swells, an optional pointer light follows the cursor, and a press stretches the glass without overshoot. Refraction needs Chromium; Safari and Firefox show frosted glass instead.
Run the following command
pnpm dlx wensity@latest add liquid-glass-button
npx wensity@latest add liquid-glass-button
yarn dlx wensity@latest add liquid-glass-button
bunx wensity@latest add liquid-glass-button
Import LiquidGlassButton from @/components/wensity/liquid-glass-button and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.
// The example icons come from @tabler/icons-react: npm i @tabler/icons-reactimport { IconArrowRight } from "@tabler/icons-react";import { LiquidGlassButton } from "@/components/wensity/liquid-glass-button";export default function Example() {return (<divclassName="flex min-h-[420px] items-center justify-center gap-4 bg-cover bg-center"style={{ backgroundImage: "url(https://assets.wensity.com/photos/portrait/lavender-fields.webp)" }}><LiquidGlassButton size="lg">Explore the collection<IconArrowRight size={20} /></LiquidGlassButton><LiquidGlassButton size="lg" tint="#0a84ff">Get started</LiquidGlassButton></div>);}
| Prop | Type | Default | Description |
|---|---|---|---|
size | "sm" | "md" | "lg" | "md" | Height and type size: 36, 44, or 56 pixels tall. |
shape | "pill" | "circle" | "pill" | A pill for labels, a circle for a single icon. Give icon buttons an aria-label. |
tone | "dark" | "light" | "dark" | Smoky glass with a white label for photos and dark pages, or brighter glass with a dark label. |
tint | string | - | Colors the glass for a primary action. Any CSS color. The label turns white. |
refraction | number | 0.6 | How hard the rim bends the backdrop, from 0 for flat glass to 1. |
frost | number | 0.35 | Blur over the backdrop, from 0 for crystal clear to 1. |
swell | number | 0.5 | How much the lens swells and bends harder under the pointer, from 0 to 1. |
pointerLight | boolean | false | Adds a light that follows the cursor on hover: a soft pool inside and a glint on the nearest rim. Without it, hover is the lens swell and a gentle lift. |
href | string | - | Renders a link instead of a button. target and rel pass through. |

A magnetic dock where icons inflate near the cursor and push their siblings aside.

A tag input where pills pop in as you add them and slide out on remove, closing the gap without snapping the layout.

One angled GPU sweep that travels across any placeholder geometry you wrap, never a separate shimmer stuttering per row.

A dual-layer orbit glow that soft-spins around the edge of any button or link you wrap it around, at zero layout cost.