Skip to content
Eskais UI

Foundations

Liquid Lens

The SVG displacement filter that data-theme="liquid" refracts floating UI through, rendered only where backdrop-filter can use it.

Example

  • Northern lights3:10
  • Glass harbour4:14
  • Slow tide5:18
  • Paper moons3:22
  • Copper wire4:26
  • Quiet engines5:30
  • Salt and cedar3:34
  • Late trains4:38
  • Blue hour5:42
  • Open water3:46

Installation

npx shadcn@latest add @eskais/liquid-lens
Brings alongnarrowtheme-liquid

Usage

Import
import { LiquidLens, liquidLensId } from "@/components/ui/liquid-lens"

Render one <LiquidLens /> in a page that uses data-theme="liquid", so floating UI refracts what is behind its edges in Chromium.

API reference

LiquidLens

PropTypeDefault
refractionHow far the edges shift what's behind, as a fraction of the element's size: 0 is flat glass. Defaults to 0.08.number0.08

Other exports

liquidLensIdtype LiquidLensProps

Accessibility

  • Hidden from assistive tech: it draws nothing itself, only the filter the theme's backdrop references.
  • Under prefers-reduced-transparency, data-elevation="flat" or without backdrop-filter, floating UI is opaque and the lens is off.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.