pnpm dlx shadcn@latest add @gammaui/aurora-glass
The AuroraGlass component renders an animated field of rounded glass tiles.
Broad directional ripple bands sweep continuously across the entire tile lattice, and each tile's bevel normal warps the sample point near its edges — giving a refraction-like effect as highlights flow from tile to tile.
It accepts children, so you can layer any content above the animation.
| Prop | Type | Default | Description |
|---|---|---|---|
width | string | number | "100%" | Container width |
height | string | number | "100%" | Container height |
className | string | "" | Additional CSS classes |
children | ReactNode | undefined | Content rendered above the effect |
speed | number | 1 | Animation speed multiplier (0–3) |
tileDensity | number | 4 | Number of tiles across the shorter side (1–16) |
rippleLayers | number | 6 | Stacked ripple layers (1–8) |
warpStrength | number | 0.33 | Per-tile inverse-distance refraction warp (0–0.6) |
bandSharpness | number | 3 | Highlight peak sharpness (0.5–10) |
chromaticSpread | number | 0 | Per-channel RGB separation (0–1) |
colorA | string | "#1E00FF" | Gradient deep color stop |
colorB | string | "#D765E6" | Gradient bright color stop |
backgroundColor | string | "#FFFFFF" | Fill color for gaps between tiles and dark areas |
opacity | number | 1 | Master alpha (0–1) |
dpr | number | 1.5 | Max device pixel ratio (1–3) |
<div className="fixed inset-0">
<AuroraGlass colorA="#1E00FF" colorB="#D765E6" tileDensity={6} />
</div><AuroraGlass
height="400px"
colorA="#001eff"
colorB="#00bcff"
backgroundColor="#000"
tileDensity={5}
rippleLayers={8}
>
<div className="flex h-full items-center justify-center">
<h1 className="text-4xl font-bold text-white">Hello World</h1>
</div>
</AuroraGlass><AuroraGlass
colorA="#ff0080"
colorB="#7928ca"
chromaticSpread={0.6}
bandSharpness={5}
tileDensity={8}
/>ResizeObserver.children rendered above the canvas layer.h-[400px]) — it fills available space automatically.tileDensity for a finer tile grid, or lower it for large bold tiles.chromaticSpread above 0.3 combined with a high bandSharpness for a vivid neon look.opacity to blend the effect over a solid background color.