Liquid Glass
A rounded glass surface that bends the backdrop along its edges.
Liquid Glass bends the content behind its rounded edges. Drag a lens across a logo or photograph to see the edge shift the backdrop.
Logo lens
Drag the lens across the UI Layouts wordmark to see its edges shift beneath the glass. With the lens focused, use the arrow keys to move it and Home to reset it.
Tide card
Drag the tide card over the water, then release it to return it to its starting position.
Landscape icons
Drag the Home and Camera icons across the landscape to see the same clear lens bend the backdrop. Both spring back when released.
Photo controls
Use the centered previous and next buttons to change photos. With either button focused, you can also use the left and right arrow keys.
The original frosted sidebar, weather widgets, mobile icons and notifications are available under Glassmorphism.
Installation
Usage
With the UI Layouts CLI, import from @/components/uilayouts/liquid-glass. The example below uses the shadcn install path, @/components/ui/liquid-glass.
| Prop | Purpose |
|---|---|
borderRadius | Shape of the glass surface, such as "50%" for a circle or "999px" for a pill. |
refraction | Strength of the optical displacement, from 0 to 3. Defaults to 1.15. |
bevel | Width of the curved rim relative to the shorter side. Defaults to 0.16. |
frost | Blur radius in CSS pixels. Use zero for clear glass. |
backdropImage | Optional ref to an underlying centered, cover-fit image. This enables a pixel-sampled lens across browsers. The image must be same-origin or permit canvas access. |
width, height, className, style | Size and placement of the surface. |
dragWithin | Pass a ref to the scene to keep the draggable lens inside it. |
draggable, expandable | Enable elastic dragging or click-to-expand sizing with expandedWidth and expandedHeight. |
glowIntensity, shadowIntensity, blurIntensity | Outer shadow, rim highlights and preset blur levels. An explicit frost takes precedence over the blur preset. |
With backdropImage, the WebGL shader samples the photograph under the control and bends its colors along the curved rim. Pressing the control distorts the image near the pointer. A Canvas 2D renderer supplies image refraction when WebGL is unavailable. Without an accessible image, the component uses the browser’s backdrop filter.


