Skip to content

    Browse components

    Glass Drift

    Translucent glass shards drift in layers over soft glowing color, bending the light with refraction, dispersion and slow cursor parallax. WebGL.

    Glass Drift

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/glass-drift

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/glass-drift.json

    Usage

    import { GlassDrift } from "@/components/ui/glass-drift";
    
    <div className="relative h-96">
      <GlassDrift density={0.55} />
    </div>

    Props

    PropTypeDefaultDescription
    colorsstring[]["#38bdf8","#a78bfa","#f0abfc"]Three glow colors behind the glass.
    speednumber1Drift speed multiplier.
    scalenumber1Shard size multiplier.
    densitynumber0.55Share of grid cells holding a shard.
    refractionnumber1Strength of the refraction.
    classNamestring—Extra classes for the root element.