Updated
Liquid Glass Lens
ProCustomize
Width224px
Height88px
Bezel38px
Shift18.5px
Zoom0.100
Dispersion0.065
Blur2.0px
Frost0.25
Saturation1.40
Highlight0.44
Shadow0.28
Installation
ProLiquid Glass Lens is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/liquid-glass-lens
Loading your installation…
Usage
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>Where to use Liquid Glass Lens
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.
Props
LiquidGlassLens- width
- Type number
- 224
- Lens width.
- height
- Type number
- 88
- Lens height.
- bezel
- Type number
- 38
- Width of the curved rim that bends light.
- shift
- Type number
- 18.5
- How far the rim pulls pixels inward.
- zoom
- Type number
- 0.1
- Magnification of the flat middle.
- dispersion
- Type number
- 0.065
- Colour split at the rim.
- blur
- Type number
- 2
- Frosted blur.
- frost
- Type number
- 0.25
- Tint over the glass.
- saturation
- Type number
- 1.4
- Colour boost through the glass.
- highlight
- Type number
- 0.44
- Rim highlight strength.
- shadow
- Type number
- 0.28
- Drop shadow strength.
- children
- Type ReactNode
- <LensSampleContent />
- What the lens floats over.
- className
- Type string
- –
- Classes for the stage.