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
Installation
npx shadcn@latest add @glint-ui/glass-driftFirst 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
| Prop | Type | Default | Description |
|---|---|---|---|
| colors | string[] | ["#38bdf8","#a78bfa","#f0abfc"] | Three glow colors behind the glass. |
| speed | number | 1 | Drift speed multiplier. |
| scale | number | 1 | Shard size multiplier. |
| density | number | 0.55 | Share of grid cells holding a shard. |
| refraction | number | 1 | Strength of the refraction. |
| className | string | — | Extra classes for the root element. |