Code
In context
Install · Free Web Component
One file, no dependencies. Aurora preset, every other option included. Host it yourself so your visitors never load anything from our servers.
The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:
Pro · React + TypeScript Pro
One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.
- React component with TypeScript types and the full shader source
- Sunset, Mint and Mono tints, plus custom tints from Brand Fit
- The vanilla Web Component with every tint, a demo page, README and license
Attributes & props
| Name | Type | Default | Description |
|---|---|---|---|
| theme | 'light' | 'dark' | 'light' | Luminous pastel on near-white, or deep saturated colour on near-black. Also sets the text colour of the content. |
| speed | number | 1 | How fast the pools drift. 0 holds the gradient still (the grain stops too). |
| grain | number 0–1 | 0.5 | Amount of film grain. Even at 0 a faint dither stays, so the ramps never band. |
| interactive | 'true' | 'false' | 'true' | The pools lean gently toward the pointer while it is over the element. |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | object | 'aurora' | The colours of the pools, or a custom tint. Mono is a quiet pearl on light and graphite on dark. Free build ships Aurora only. |
The element is a block that fills whatever size you give it — set a height, min-height or put it in a grid cell — and its children render on top, so lay them out with display: grid or flex on the element itself. A border-radius on it rounds the gradient. It is drawn at one sample per CSS pixel and capped for page-size areas, pauses off-screen and in hidden tabs, and under prefers-reduced-motion shows one still frame. Without WebGL (and before the script loads) a CSS gradient in the same colours stands in. The background is decoration: it is hidden from screen readers and never takes pointer events from your content. Check the contrast of small text over the brightest pool.
More components
- Silk Waves
- Dot Field
- Tide Slide
- Pearl Code
- Ink Sphere
- Frost Card
- Holo Card
- Stream Text
- Lens Compare
- Pearl Dial
- Nova Rating
- Pearl Check
- Pearl Input
- Glass Toast
- Pearl Select
- Glass Sheet
- Pearl Accordion
- Glass Tip
- Pearl Calendar
- Glass Nav
- Pearl Tabs
- Glass Command
- Halo Avatar
- Pearl Steps
- Pearl Skeleton
- Pearl Table
- Pearl Chip
- Pearl Empty
- Roll Counter
- Glass Marquee
- Reveal Text
- Plasma Orb
- Voice Wave
- Plush Buddy
- Gummy Agent
- Glass Tabbar
- Glass Menu
- Pearl Pricing
- Glass Bento
- Quote Wall
- Glass Cta
- Magnet Button
- Beam Border
- Spotlight Card
- Scratch Reveal
- Glass Sidebar
- Pearl Pagination
- Pearl Breadcrumb
- Glass Dock
- Pearl Slider
- Pearl Segmented
- Liquid Metal Button
- Mercury Orb
- Prompt Input
- Voice Orb
- Aurora Ring
- Glass Toggle
- Firefly Button
- Pearl Button
- Pearl Loader
- Alien Face
- Prism Button
- Liquid Carousel
- Orbit Carousel
- Deck Carousel