# Liquid Glass Cards

> Crystal-clear glass cards with lens-like edges, rainbow dispersion, a rim highlight that tracks the pointer and a liquid press.

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

## When to use it

Cards over a photo, gradient or video background, such as a hero with floating stats, a music player or a settings panel. The glass only shines when there is something behind it to bend.

## How it works

A canvas draws a displacement map the size of the card: near the rounded edge every pixel is pushed outward along the edge's normal, following a lens-shaped curve, and the middle stays put. An SVG filter applies that map to the backdrop three times, once per colour channel at slightly different strengths, which splits light into a thin rainbow fringe at the rim. Layered inset shadows give the glass thickness, a conic highlight turns to face the pointer, and a spring squish answers a press.

## Installation

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

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `refraction` | `number` | `0.5` | 0–1. How strongly the rim bends what is behind it. Chrome and Edge only; other browsers show clear glass. |
| `dispersion` | `number` | `0.4` | 0–1. Rainbow fringing where the rim bends light, like a real lens. Needs refraction. |
| `blur` | `number` | `0` | Backdrop blur in pixels. 0 keeps the glass perfectly clear. |
| `parallax` | `number` | `4` | How far the content drifts toward the pointer, in pixels. 0 keeps it still. |
| `glow` | `string` | `"#5FAEB4"` | Colour of the luminous border and reflection glow. |
| `children` | `ReactNode` |  | Card content. |

## Accessibility

- **Keyboard: Pass.** A static container. When it holds a link or button, focusing it lights the border and reflection, so keyboard users get the same highlight as the pointer.
- **Screen readers: Pass.** Every glass, refraction, reflection and border layer is hidden from assistive tech. Only your content is read.
- **Reduced motion: Pass.** With reduced motion on, the card does not lift, drift, sweep or squish, and the rim highlight stays still. The glow fades in place.
- **Colour contrast: Partial.** Clear glass shows everything behind it, so contrast depends entirely on your background. Text gets a faint shadow, but test it over your busiest, brightest areas, or add a little blur.
