uibrik

Liquid Glass Lens

Preview

Customize

Width224px
Height88px
Bezel38px
Shift18.5px
Zoom0.100
Dispersion0.065
Blur2.0px
Frost0.25
Saturation1.40
Highlight0.44
Shadow0.28

Usage

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

<LiquidGlassLens />

Installation

npx shadcn@latest add https://uibrik.com/r/liquid-glass-lens.json
Adds the files to components/uibrik/liquid-glass-lens and installs motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/liquid-glass-lens.

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.