# Liquid Glass Panel

> 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.

Category: Cards · MotionKit Plus · Updated 2026-11-10 · Live demo: https://www.motionkitui.com/components/liquid-glass-panel

## When to use it

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.

## How it works

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.

## Installation

Part of MotionKit Plus (https://www.motionkitui.com/pricing). Subscribers install it with `npx shadcn@latest add @motionkit/liquid-glass-panel` after adding their registry token from https://www.motionkitui.com/account.

## Props

| 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. |

## Accessibility

- **Keyboard: Pass.** When draggable it's one tab stop with a visible ring, and the arrow keys glide it (Shift for bigger steps), kept inside its container.
- **Screen readers: Pass.** Announced as a movable glass panel with its arrow-key shortcuts; the glass layers are hidden and your content is read as normal.
- **Reduced motion: Pass.** With reduced motion on, it doesn't squash, tilt its content or lean its highlight, and arrow keys move it instantly.
- **Colour contrast: Partial.** The glass shows whatever is behind it, so contrast depends on your backdrop. Add frost, or a darker tint, behind body text over busy images.
