Skip to content
WebGL glass layer and base-maia components

The Glass Layer for your Design System

Composable shadcn/ui components whose edges refract the light behind them. Copy the code, keep your theme, and fall back to CSS glass anywhere.

BadgeSecondary
Contribution History
Last 5 months of activity
Dec
Jan
Feb
Mar
Apr

Upcoming

May 2026

Scheduled

Savings plan

Accelerated

Recurring

Claimable Balance
$1,211.29
Pending setup
Royalties$842.10
Referral bonus$250.00
Interest$119.19
Scan to connect your mobile device
Open the mobile app and scan this code to link your device.
New Chat
How can I help you today?

Ask about glass, refraction or the registry.

Install the cardWhy WebGL?
Analytics
418.2K
+10%
Visitors in the last 30 days
Playground

Tune the optics

Adjust refraction, bezel and thickness, then apply them to every glass surface on this page.

Scene
1px
1.8
5%
Light

liquidcn · glass effects for the web · physics-based refraction · real-time preview · liquidcn · glass effects for the web · physics-based refraction · real-time preview ·
Liquid Glass
Real-time preview

Adjust the sliders to see how each physics parameter affects the refraction and displacement.

PreviewActive
Physics
1.50
0.15
0.80
0.12
1.00
225°
Install

Four steps with the shadcn CLI

This site serves its own registry at liquidcn.dev/r. Point the CLI at it from any React project with Tailwind CSS v4.

  1. Add the theme

    Glass tokens and the .glass utilities go into your global CSS.

    terminal
    npx shadcn@latest add \
      https://liquidcn.dev/r/theme.json
  2. Add components

    Plain shadcn/ui source on Base UI. You own the code after install.

    terminal
    npx shadcn@latest add \
      https://liquidcn.dev/r/card.json \
      https://liquidcn.dev/r/button.json \
      https://liquidcn.dev/r/input.json
  3. Mount the refraction filter

    One SVG filter adds edge refraction to CSS glass in Chromium. Other browsers keep a frosted blur.

    app/layout.tsx
    npx shadcn@latest add \
      https://liquidcn.dev/r/glass-filter.json
    
    // app/layout.tsx
    import { GlassFilter } from "@/components/ui/glass-filter"
    
    <body>
      <GlassFilter />
      {children}
    </body>
  4. Optional: WebGL glass

    Give the layer a canvas or video backdrop and mark the panes. Without WebGL2 they stay CSS glass.

    page.tsx
    npx shadcn@latest add \
      https://liquidcn.dev/r/liquid-glass-layer.json
    
    // page.tsx
    import { LiquidGlassLayer } from "@/components/ui/liquid-glass-layer"
    import { setGlassLiveBackdropSource } from "@/lib/glass-live-backdrop"
    
    setGlassLiveBackdropSource(backgroundCanvas)
    
    <LiquidGlassLayer />
    <Card data-liquid-glass>…</Card>