Crystal-clear glass cards with lens-like edges, rainbow dispersion, a rim highlight that tracks the pointer and a liquid press.
Liquid glass you can hold: a domed lens that magnifies and bends the backdrop with a rainbow rim, squashing like jelly as you drag it and casting focused light into its shadow.
Customize
Usage
import { LiquidGlassPanel } from "@/components/motionkit/liquid-glass-panel";
// put it over something colourful: an image, a gradient or big type
<div className="relative h-[32rem] overflow-hidden rounded-3xl bg-[url(/hero.jpg)] bg-cover">
<LiquidGlassPanel
className="w-72"
>
<div className="p-6">Your content</div>
</LiquidGlassPanel>
</div>Motion
The exact curves this component runs, plotted with Motion's own maths.
Squash and stretch
Drag
Press
Press
Highlight turns
Pointer moves
Product heroes over photography or video, music and media players, widgets and floating controls, and any page that wants the new liquid glass look with real physics behind it.
A displacement map is drawn per pixel for the panel's exact size and corner radius. Near the rim, each point samples the backdrop from further out along the edge's normal, easing in along a circular curve, so the image bends round the edge; across the middle, points sample slightly towards the centre, which magnifies like a dome. An SVG filter applies the map through backdrop-filter three times, once per colour channel at slightly different strengths, to split a fine rainbow at the rim. Dragging feeds the panel's velocity into springs that squash and stretch it, pressing softens its corners, and a conic highlight and a coloured caustic in its shadow turn with the pointer.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | What sits on the glass. |
| refraction | number | 0.6 | How strongly the rim bends the backdrop, 0 to 1. Chromium only; others get frosted glass. |
| magnify | number | 0.5 | How much the middle enlarges, like a droplet's dome. |
| dispersion | number | 0.5 | Rainbow fringing at the rim, 0 to 1. |
| frost | number | 0 | Blur in pixels. 0 keeps it crystal clear. |
| tint | string | "#9FD8DC" | Colour of the light it catches and casts. |
| radius | number | 28 | Corner radius; pressing softens it. |
| draggable | boolean | true | Drag it around its container; arrow keys move it too. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Only the motion package, beside React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes, with MotionKit Plus. Add the @motionkit registry and your personal token to components.json (the snippet is on your account page), then run npx shadcn@latest add @motionkit/liquid-glass-panel. It saves the file to components/motionkit and installs its dependencies.
Liquid Glass Panel is part of MotionKit Plus (£12 / $15 / €14 a month or £96 / $120 / €112 a year). The live preview and playground are free to explore; Plus unlocks its source code, every customisation control and commercial use.
With reduced motion on, it doesn't squash, tilt its content or lean its highlight, and arrow keys move it instantly.
Bending the backdrop needs an SVG filter inside backdrop-filter, which only Chromium supports today. Elsewhere the panel falls back to frosted glass with the same highlights, shadow and physics, so it still looks deliberate.
Crystal-clear glass cards with lens-like edges, rainbow dispersion, a rim highlight that tracks the pointer and a liquid press.
A disc of liquid glass that glides after the cursor, enlarging whatever is beneath it, with a rainbow rim and a highlight rolling across the dome.
A deck you swipe through: fling the top card and it tucks in at the back.
Drag me
Liquid glass
The live preview is free to explore. Plus unlocks the source for Liquid Glass Panel and every other premium component.
Not ready for Plus? A free account unlocks 4 premium components, Depth Card, Rolling Text, Dot Wave and Confetti Button, with no card needed.
Customize
Usage
import { LiquidGlassPanel } from "@/components/motionkit/liquid-glass-panel";
// put it over something colourful: an image, a gradient or big type
<div className="relative h-[32rem] overflow-hidden rounded-3xl bg-[url(/hero.jpg)] bg-cover">
<LiquidGlassPanel
className="w-72"
>
<div className="p-6">Your content</div>
</LiquidGlassPanel>
</div>Motion
The exact curves this component runs, plotted with Motion's own maths.
Squash and stretch
Drag
Press
Press
Highlight turns
Pointer moves
Drag me
Liquid glass