Aurora Glass
Three blurred sheets of colour slowly drift and turn behind a glass card that lifts on hover: an aurora with no canvas and no script.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Glassmorphism has 47 effects, including 6 free. Explore the category →
3 usage examples



How it works
The aurora is made of three empty divs, .aurora-glass-wave, kept in a layer that clips them. Each one is twice the size of the scene (640 × 480 px for a 320 × 240 scene) and carries a 135° gradient that fades out two thirds of the way — cyan to indigo, violet to pink, green to turquoise — plus 40% rounded edges and a filter: blur(40px) that wipes out any outline. Their opacities (0.5, 0.35 and 0.3) let the midnight-blue #060610 background rise between them.
Each sheet follows its own @keyframes loop: it slides by up to 15% of its size and turns by up to 15°, over 12, 10 and 14 seconds. Because the three durations differ, the colours only line up in the same place every 420 seconds: the loop cannot be seen. Only transform is animated: the sheets are not repainted, just moved; the card's frosting, however, is recomputed on every frame.
In front sits .aurora-glass-card: 240 × 160 px, centred, 6% white, backdrop-filter: blur(20px), a slanted sheen in its ::before. On hover it brightens to 9%, deepens its shadow and grows by 3% in 0.4 s (247 × 165 px measured). It does the same as soon as anything inside it receives focus. It is a plain container: icon, title and text can be swapped for whatever you need — a form, a price, a link.
Accessibility
- Reduced motion: when the visitor has turned that setting on, the three sheets stop at their starting position — the aurora stays, still — and the card no longer grows: it keeps its change of tint and shadow, applied with no transition. Measured in all three engines: no animation left running.
- Keyboard: the demo card is a
div, Tab does not stop on it — and there is nothing to activate. If it leads somewhere, write it as<a class="aurora-glass-card" href="…">: measured, it then takes focus, lifts as on hover and gets a 2 px#a5f3fcoutline. - Cursor: the code gives the card
cursor: pointer, which promises a click. If your card is not clickable (a panel, a form), addcursor: auto— the sign-in and banner examples do. - Contrast: it varies with the sheet passing behind. Measured over the whole card surface for twelve seconds: white title between 3.6:1 and 13.9:1; subtitle in 50% white between 2.1:1 and 4.7:1, too weak when the cyan passes. Raise the subtitle to 85% and, for long text, darken the card (
rgba(8, 10, 30, .35)). - Touch: in Chromium touch emulation the tapped card stays lifted until the next tap; under touch WebKit the tap triggered nothing. The aurora itself runs without any gesture.
Browser compatibility
Measured under Playwright in Chromium, Firefox and WebKit: the three loops run, with the same computed values for the card at rest, on hover and on focus. The card's frosting could only be looked at in Chromium: automated captures of the other two engines do not paint it. Real Safari: not verified. Minimum versions according to MDN: the inset property, which stretches the layer and the sheen, needs Chrome 87, Edge 87, Firefox 66, Safari 14.1; backdrop-filter needs Firefox 103, and Safari reads it with the -webkit- prefix (declared) up to version 17. :focus-within and :focus-visible are written in rules of their own: a browser that ignores one keeps the hover. Three 640 × 480 px layers blurred at 40 px stay light while the scene is small; full screen on an entry-level phone, keep an eye on smoothness.
Without backdrop-filter the card is only a 6% white veil: the aurora shows sharply through it, and the text gets hard to read when a bright sheet passes. Give it a denser fill inside @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))), for instance rgba(10, 12, 32, .6). The sheets' animation only depends on transform and filter.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0310-root">
<div class="aurora-glass-scene">
<div class="aurora-glass-layer">
<div class="aurora-glass-wave aurora-glass-wave--1"></div>
<div class="aurora-glass-wave aurora-glass-wave--2"></div>
<div class="aurora-glass-wave aurora-glass-wave--3"></div>
</div>
<div class="aurora-glass-card">
<div class="aurora-glass-icon">
<svg viewBox="0 0 24 24"><path d="…"></path></svg>
</div>
<h3>…</h3>
<p>…</p>
</div>
</div>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
Aurora colours (CSS — .aurora-glass-wave--1, --2, --3) |
cyan #22d3ee → indigo, violet #a855f7 → pink, green #10b981 → turquoise |
Each sheet is a linear-gradient(135deg, colour A, colour B 50%, transparent 70%): change A and B, keep the final transparent, otherwise the sheets form a flat fill. Two sheets are enough for a calmer background. |
Speed (CSS — durations 12s, 10s, 14s) |
three loops of different lengths | Divide all three by the same number to speed up. Keep the durations unequal: with three identical values the pattern repeats to the naked eye. |
Range (CSS — @keyframes auroraGlassWave1 to 3) |
slide of up to 15%, turn of up to 15° | Percentages refer to the sheet, twice as large as the scene: 10% is therefore 64 px in the demo. Past 25%, an edge of a sheet may enter the frame. |
Intensity (CSS — opacity and filter: blur(40px) on the sheets) |
opacities 0.5 / 0.35 / 0.3, 40 px blur | More opacity gives a vivid aurora but less readable text on the card. A 20 px blur shows the rounded shape of the sheets; 60 px melts them into a single halo. |
Glass of the card (CSS — .aurora-glass-card) |
240 × 160 px, 6% white, 20 px blur, 16 px corners | Width, height and padding are free; the card stays centred through top: 50%; left: 50%. Edit the blur on both of its lines, prefixed and unprefixed. |
Lift (CSS — :hover and :focus-within, scale(1.03), transition: .4s) |
+3%, 9% fill, 0 12px 40px shadow |
Both rules carry the same values: change them together. Keep translate(-50%, -50%) in front of scale(), or the card jumps off centre. |
Scene size (CSS — .aurora-glass-scene) |
320 × 240 px, 16 px corners, #060610 background |
The sheets follow in percentages: the scene can become a page background (width: 100%; height: 100vh) or a 90 px strip. The midnight-blue background gives the aurora its depth; on a light background it turns pastel. |
FAQ
canvas, frame by frame, with a script: its ribbons really ripple, and it provides an opaque panel for people who reduce transparency. Aurora Glass has no canvas and no script — three divs and three @keyframes: these are wide sheets that drift, not ribbons that ripple. In return its colours are changed in the CSS, nothing has to be recomputed when the block changes size, and its card reacts to hover and focus whereas Frosted Aurora's panel is inert. Both respect reduced motion.:focus-within rule lifts it as on hover — handy to flag the block being filled in. For a fully clickable card, change its tag to <a>: the CSS already removes the underline and provides the focus outline. Either way, remove or keep cursor: pointer depending on whether a click on the card does anything..aurora-glass-scene the size of the page, drop its rounded corners and, if you have no use for the card, delete it: the sheets live on their own in their layer. Two precautions: the sheets are always twice the scene, so 2 × the screen size once used full background — test on a modest phone; and set your text on a panel or a dark veil, because the brightest area of the background keeps moving.