# Liquid Glass Lens (Pro)

> A draggable glass pill that refracts whatever sits underneath it.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Components › Effects |
| Live preview | https://uibrik.com/components/liquid-glass-lens |
| Writes | 1 file into `components/uibrik/liquid-glass-lens/` |
| Packages | `motion`, `react-use-measure` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/liquid-glass-lens
```

No license yet? Tell the user Liquid Glass Lens is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=liquid-glass-lens#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { LiquidGlassLens } from "@/components/uibrik/liquid-glass-lens/LiquidGlassLens";

<LiquidGlassLens
  width={224}
  height={88}
  bezel={38}
  shift={18.5}
  zoom={0.1}
  dispersion={0.065}
  blur={2}
  frost={0.25}
  saturation={1.4}
  highlight={0.44}
  shadow={0.28}
>
  …
</LiquidGlassLens>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/liquid-glass-lens.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `width` | `number` | `224` | Lens width. |
| `height` | `number` | `88` | Lens height. |
| `bezel` | `number` | `38` | Width of the curved rim that bends light. |
| `shift` | `number` | `18.5` | How far the rim pulls pixels inward. |
| `zoom` | `number` | `0.1` | Magnification of the flat middle. |
| `dispersion` | `number` | `0.065` | Colour split at the rim. |
| `blur` | `number` | `2` | Frosted blur. |
| `frost` | `number` | `0.25` | Tint over the glass. |
| `saturation` | `number` | `1.4` | Colour boost through the glass. |
| `highlight` | `number` | `0.44` | Rim highlight strength. |
| `shadow` | `number` | `0.28` | Drop shadow strength. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `children` | `ReactNode` | `<LensSampleContent />` | What the lens floats over. |
| `className` | `string` |  | Classes for the stage. |

## Where it fits

- **Glass effect showcases**: A draggable pill that refracts what is underneath demonstrates real liquid glass in the browser.
- **Hero details**: A movable lens over the hero image gives visitors something to explore.
- **Apple-style product sites**: Refraction echoes the glass look of recent Apple interfaces.

## Same shelf: Effects

- [Marquee](https://uibrik.com/components/marquee.md): An endless, seamless row of logos, quotes or tags that slows on hover and fades out at the edges.
- [Lock Melt](https://uibrik.com/components/lock-melt.md) (Pro): Premium content frozen under ice and a steel padlock; rub the ice with the pointer and it wipes clear, then fogs back over. Unlocking heats the lock through dull red, orange and yellow, trembling and shedding embers. At full heat the shackle pops open in a shower of sparks, sags, and melts into WebGL metaball droplets that mirror the content, run down the panel and steam the ice away wherever they pass.
- [Offline Plug](https://uibrik.com/components/offline-plug.md) (Pro): A connection status pill with a shaded plug and power strip. When the network drops, the plug is yanked out in a burst of sparks, falls to the floor and rocks to rest on its simulated cable, then keeps trying to get back in. Drag it into the socket to retry: it stays in with a green light when the connection is back, or gets thrown out again.
- [Paper Shredder](https://uibrik.com/components/paper-shredder.md) (Pro): Drag a document into the slot and the motor pulls it through, out into strips that sway, drop and crumple onto the pile.
- [Sticker Peel](https://uibrik.com/components/sticker-peel.md) (Pro): A vinyl sticker you peel up with a real curl, carry with a swing, stick anywhere or throw, with a foil finish that catches the light under the pointer, many artwork formats and image files dropped in as new stickers.
- [Wax Seal](https://uibrik.com/components/wax-seal.md) (Pro): A document card you sign and seal. Draw your signature on a pen-like pad (strokes thin with speed and follow pen pressure; Enter signs with your name), then seal it: molten WebGL wax drops land and merge into a pool, a brass and walnut stamp comes down with its shadow tightening, squeezes the wax into a rim, rocks, lifts away to show the emblem in relief, and the wax cools from wet gloss to satin.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/liquid-glass-lens/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
