MIT-licensed · TypeScript · React 18+
Apple liquid glass,
as a React component
Wrap anything in <LiquidGlass /> and it refracts the background like real glass — pure SVG turbulence and a displacement map over backdrop-blur. No WebGL, no canvas, no shaders — just browser primitives, controlled through props.
$
Browse examples →npm install react-liquid-glass-svgExamples
Patterns from the wild
Realistic UI surfaces built with a single <LiquidGlass> — preview on the left, the code on the right.
Mini player widget — album art, controls, progress bar.
player.tsx
<LiquidGlass
glassBorder
backdropBlur={5}
tintColor="rgba(255,255,255,0.15)"
className="rounded-2xl p-5 w-[360px]"
>
<div className="flex items-center gap-4">
<AlbumArt />
<TrackMeta />
<PlayControls />
</div>
<ProgressBar value={42} />
</LiquidGlass>Playground
Tweak it live
Every slider drives the real component. The code on the right updates in real time — copy and paste.
tintColorrgba(255, 255, 255, 0.18)
sandbox.tsx
<LiquidGlass
backdropBlur={2}
tintColor="rgba(255, 255, 255, 0.18)"
displacementScale={150}
turbulenceBaseFrequency={0.008}
turbulenceSeed={1.5}
glassBorder
style={{ borderRadius: 28 }}
>
<div className="px-[34px] py-8">
<div className="font-mono text-[11.5px] uppercase tracking-[0.04em] text-white/75">
<LiquidGlass />
</div>
<h3 className="mt-2.5 font-disp text-[26px] font-semibold text-white">
Live glass
</h3>
<p className="mt-2.5 text-[14.5px] text-white/[0.88]">
Drag the controls and watch the refraction change as the background bends.
</p>
</div>
</LiquidGlass>