Nativ ui
Documentation

Liquid Glass (Advanced)

iOS 26-style liquid glass components — the glass material is on the actual interactive element, not a wrapper.

Overview

These components apply true physics-based glass refraction directly to the interactive UI element (button surface, slider thumb, toggle thumb, tab indicator, etc.) — not to a card around it. Two engines, ported from archisvaze/liquid-glass:

EngineTechniqueBrowser support
SVGfeDisplacementMap + backdrop-filter: url(#filter)Chromium only
WebGLGLSL fragment shaderAll modern browsers

Each example shows both engines side by side.

Primary Button

A pill-shaped button — the entire button surface IS the glass.

SVG

Continue

WebGL

Continue

Icon Button

A small circular icon button — actual button-sized.

SVG

WebGL

Segmented Tabs

The active tab indicator IS the liquid glass pill — sliding behind the labels (just like UISegmentedControl).

SVG

Day
Week
Month

WebGL

Day
Week
Month

Slider

The slider thumb is the glass element — like Apple's volume slider in Control Center.

SVG

WebGL

Toggle Switch

The toggle thumb IS the glass — a tiny refractive disc that slides across a colored track.

SVG

WebGL

Search Pill

The search field itself is a small glass pill.

SVG

Search⌘K

WebGL

Search⌘K

Status Pills

Tiny live-status badges — actual badge size.

SVG

Online
Busy
Offline

WebGL

Online

Floating Action Bar

A tight cluster of glass icon buttons, like the iOS Camera shutter row.

SVG

WebGL

Volume Knob

A round draggable knob — for stereo / EQ apps.

SVG

68

WebGL

68

Floating Tab Bar

iOS-style bottom tab bar — the active tab pill is glass, the bar itself is a translucent surface.

SVG

WebGL

Notification Pill

A compact island-style notification banner (Dynamic Island feel).

SVG

Saved to Photosnow

WebGL

Saved to Photosnow

Design Principles

The trick to convincing liquid glass UI is scope — apply the glass only to the part that should look refractive:

ComponentGlass elementNon-glass element
ButtonWhole button surface
Icon buttonWhole circle
SliderThumb onlyTrack
ToggleThumb onlyColored track
Segmented tabsActive indicator onlyContainer background
Floating tab barActive tab pill onlyBar background
Search pillWhole pill
Notification pillWhole pill
Volume knobWhole knob

Wrap your interactive shape in LiquidGlassSVG / LiquidGlassWebGL at the exact size of the interactive shape — never inflate it into a card unless the component IS a card.

Props Reference

PropTypeDefaultDescription
width / heightnumber280 / 160Glass size in pixels
radiusnumber48Border radius
glassThicknessnumber80Refraction magnitude
bezelWidthnumber40Width of refractive edge
refractiveIndexnumber1.5IOR (1.0 = none, 3.0 = extreme)
tintOpacitynumber0.06Tint strength
backgroundUrlstring (WebGL only)Background image for the shader

Best Practices

  1. Match the size to the actual UI element — a button is 36-44px tall, a slider thumb is 24-28px, an icon button is 36-40px
  2. Use bezel ≈ height/3 as a starting point — gives a believable refraction profile at any size
  3. Use radius = height/2 for fully round / pill shapes
  4. Glass on the moving / interactive part only — let the static parts be normal CSS
  5. WebGL for cross-browser — Firefox and Safari don't support the SVG variant