CrystalAmbientGlow
Animated background glow for atmospheric lighting effects.
CrystalAmbientGlow creates subtle, animated gradient blobs that sit behind content for atmospheric depth. Three variants handle full-screen backgrounds, localized spots behind elements, or corner accents.
Import
import { CrystalAmbientGlow } from '@artasce/crystal-ui';Usage
{/* Full-page background glow */}
<CrystalAmbientGlow />
{/* Behind a specific element */}
<div className="relative">
<CrystalAmbientGlow variant="spot" />
<CrystalCard title="Featured" />
</div>Props
CrystalAmbientGlow Props
| Token | Variable | Value |
|---|---|---|
color | 'default' | 'amethyst' | 'warm' | 'cool' | 'amethyst' |
intensity | 'low' | 'medium' | 'high' | 'medium' |
variant | 'full' | 'spot' | 'corner' | 'full' |
animate | boolean | true |
speed | 'slow' | 'medium' | 'fast' | 'slow' |
className | string | — |
Click any row to copy the CSS variable.
Variants
Full (Page Background)
Creates two glow blobs at opposite corners, covering the full viewport. Uses position: fixed and z-index: -1.
<CrystalAmbientGlow variant="full" color="amethyst" />Spot (Behind Element)
A single centered glow that sits behind a parent element. Uses position: absolute and requires a parent with position: relative.
<div className="relative">
<CrystalAmbientGlow variant="spot" color="cool" />
<div className="relative z-10">Content above the glow</div>
</div>Corner (Accent)
A single glow positioned at the top-left corner. Good for section accents or card decorations.
<section className="relative overflow-hidden">
<CrystalAmbientGlow variant="corner" color="warm" />
<h2>Section Title</h2>
</section>Color Options
| Color | Gradient |
|---|---|
default | White/transparent (subtle) |
amethyst | Purple tones (#4d0a5c) |
warm | Orange tones (#ff7c0a) |
cool | Blue tones (#a1d6f7) |
Accessibility
The glow element renders with aria-hidden="true" and pointer-events: none, so it has no impact on interaction or screen readers.