Aurora background
Four soft colour blobs, heavily blurred and screen-blended, drift and breathe under a dark product section with a bright headline; one tap swaps the palette — borealis, sunset or ocean.
Real scenarios
The component as it is used in a product — not a specimen grid.
A sky that breathes under the headline
Four blobs at 64px blur and screen blend drift on their own 24–34s periods — only transform animates, so the section stays GPU-cheap. The palette dots retune the sky live; off screen the drift parks and under reduced motion it settles into a still aurora.
Cold deploys under the aurora
Edge compute in 31 cities — sub-50ms latency, zero config. Your build lands where your users already are.
4 blobs · blur 64px · mix-blend-mode: screen · transform-only drift · pauses off screen
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| data-pal | string | 'borealis' | Palette: borealis · sunset · ocean; swaps the three blob colours through CSS variables. |
| --amba-blur | length | '64px' | How soft the blobs are; more = smoother and fainter, less = colour edges. |
| blob | keyframes | '22–34s' | Each blob owns its path and period; only transform animates so it stays on the GPU. |
| pause | state | 'off-screen' | An IntersectionObserver pauses the drift off screen; under reduced motion it stops entirely. |
Snippet
<section class="amba" data-pal="borealis" data-running="true">
<div class="amba-sky" aria-hidden="true">
<i class="amba-blob a"></i><i class="amba-blob b"></i>
<i class="amba-blob c"></i><i class="amba-blob d"></i>
</div>
<h2>Cold deploys under the aurora</h2>
<p>Edge compute in 31 cities — sub-50ms latency.</p>
</section>
<style>
.amba { position: relative; overflow: clip; border-radius: 1.25rem;
min-block-size: 22rem; display: grid; place-content: center; text-align: center;
background: #0a1120; color: #f1f5f9; }
.amba-sky { position: absolute; inset: 0; }
.amba-blob { position: absolute; inline-size: 26rem; aspect-ratio: 1; border-radius: 50%;
filter: blur(64px); mix-blend-mode: screen; opacity: .55; }
.amba[data-pal='sunset'] { --amba-c1: #f97316; --amba-c2: #ec4899; --amba-c3: #8b5cf6; }
.amba-blob.a { background: var(--amba-c1, #22d3ee); animation: amba-drift-a 26s ease-in-out infinite alternate; }
@keyframes amba-drift-a { from { translate: -20% -30%; scale: 1; }
to { translate: 15% 10%; scale: 1.25; } }
.amba[data-running='false'] .amba-blob { animation-play-state: paused; }
</style>
// app/Pages/Aurora.jsx — Inertia (React) page; renders the React
// snippet below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import AuroraHero from '@/components/AuroraHero';
export default function Aurora() {
return (
<NabuXUIProvider locale="en" linkComponent={Link}>
<main className="nx-page">
<AuroraHero />
</main>
</NabuXUIProvider>
);
}
// AuroraHero.jsx — aurora background: blurred blobs drifting under a dark section
import { useEffect, useRef, useState } from 'react';
import '@nabuxai/ui-core/css';
const PALETTES = {
borealis: ['#22d3ee', '#34d399', '#818cf8'],
sunset: ['#f97316', '#ec4899', '#8b5cf6'],
ocean: ['#38bdf8', '#6366f1', '#0ea5e9'],
};
const BLOBS = [
{ cls: 'a', size: '26rem' }, { cls: 'b', size: '32rem' },
{ cls: 'c', size: '22rem' }, { cls: 'd', size: '28rem' },
];
export default function AuroraHero() {
const [pal, setPal] = useState('borealis');
const [running, setRunning] = useState(true);
const sectionRef = useRef(null);
// Park the drift off screen; reduced-motion users get a still sky.
useEffect(() => {
const io = new IntersectionObserver(
([e]) => setRunning(e.isIntersecting),
{ threshold: 0.15 },
);
io.observe(sectionRef.current);
return () => io.disconnect();
}, []);
return (
<>
<style>{`
.amba { position: relative; overflow: clip; border-radius: 1.25rem; min-block-size: 22rem;
display: grid; place-content: center; text-align: center; background: #0a1120; color: #f1f5f9; }
.amba-sky { position: absolute; inset: 0; }
.amba-blob { position: absolute; border-radius: 50%; filter: blur(64px);
mix-blend-mode: screen; opacity: .55; }
.amba-blob.a { animation: amba-drift-a 26s ease-in-out infinite alternate; }
.amba-blob.b { animation: amba-drift-b 32s ease-in-out infinite alternate; }
.amba-blob.c { animation: amba-drift-c 24s ease-in-out infinite alternate; }
.amba-blob.d { animation: amba-drift-d 34s ease-in-out infinite alternate; }
@keyframes amba-drift-a { from { translate: -20% -30%; scale: 1; } to { translate: 15% 10%; scale: 1.25; } }
@keyframes amba-drift-b { from { translate: 60% 20%; scale: 1.2; } to { translate: 25% -25%; scale: .95; } }
@keyframes amba-drift-c { from { translate: 30% 70%; scale: .9; } to { translate: 55% 40%; scale: 1.3; } }
@keyframes amba-drift-d { from { translate: -35% 45%; scale: 1.1; } to { translate: -5% 60%; scale: .9; } }
.amba[data-running='false'] .amba-blob { animation-play-state: paused; }
.amba-copy { position: relative; padding: 2rem; }
.amba-dots { display: flex; gap: .5rem; justify-content: center; margin-block-start: 1.25rem; }
.amba-dot { inline-size: 2rem; block-size: 2rem; border-radius: 50%; border: 2px solid #f1f5f940; cursor: pointer; }
.amba-dot[aria-pressed='true'] { border-color: #f8fafc; }
@media (prefers-reduced-motion: reduce) { .amba-blob { animation: none; } }
`}</style>
<section className="amba" data-running={running} ref={sectionRef}
style={{ ['--amba-c1']: PALETTES[pal][0], ['--amba-c2']: PALETTES[pal][1], ['--amba-c3']: PALETTES[pal][2] }}>
<div className="amba-sky" aria-hidden="true">
{BLOBS.map((b, i) => (
<i key={b.cls} className={`amba-blob ${b.cls}`} style={{
inlineSize: b.size, blockSize: b.size,
insetInlineStart: `${8 + i * 22}%`,
insetBlockStart: `${(i % 2) * 30}%`,
background: PALETTES[pal][i % 3],
}} />
))}
</div>
<div className="amba-copy">
<h2>Cold deploys under the aurora</h2>
<p>Edge compute in 31 cities — sub-50ms latency, zero config.</p>
<div className="amba-dots" role="group" aria-label="Aurora palette">
{Object.entries(PALETTES).map(([id, [c]]) => (
<button key={id} type="button" className="amba-dot" aria-pressed={pal === id}
aria-label={id} style={{ background: c }} onClick={() => setPal(id)} />
))}
</div>
</div>
</section>
</>
);
}
<!-- AuroraHero.vue — aurora background: blurred blobs drifting under a dark section -->
<script setup lang="ts">
import { onBeforeUnmount, onMounted, ref } from 'vue';
import '@nabuxai/ui-core/css';
const palettes: Record<string, string[]> = {
borealis: ['#22d3ee', '#34d399', '#818cf8'],
sunset: ['#f97316', '#ec4899', '#8b5cf6'],
ocean: ['#38bdf8', '#6366f1', '#0ea5e9'],
};
const blobs = [
{ cls: 'a', size: '26rem' }, { cls: 'b', size: '32rem' },
{ cls: 'c', size: '22rem' }, { cls: 'd', size: '28rem' },
];
const pal = ref('borealis');
const running = ref(true);
const section = ref<HTMLElement | null>(null);
let io: IntersectionObserver | null = null;
// Park the drift off screen; reduced-motion users get a still sky.
onMounted(() => {
io = new IntersectionObserver(([e]) => { running.value = e.isIntersecting; }, { threshold: 0.15 });
if (section.value) io.observe(section.value);
});
onBeforeUnmount(() => io?.disconnect());
</script>
<template>
<section ref="section" class="amba" :data-running="running"
:style="{ '--amba-c1': palettes[pal][0], '--amba-c2': palettes[pal][1], '--amba-c3': palettes[pal][2] }">
<div class="amba-sky" aria-hidden="true">
<i v-for="(b, i) in blobs" :key="b.cls" :class="['amba-blob', b.cls]"
:style="{ inlineSize: b.size, blockSize: b.size,
insetInlineStart: `${8 + i * 22}%`, insetBlockStart: `${(i % 2) * 30}%`,
background: palettes[pal][i % 3] }" />
</div>
<div class="amba-copy">
<h2>Cold deploys under the aurora</h2>
<p>Edge compute in 31 cities — sub-50ms latency, zero config.</p>
<div class="amba-dots" role="group" aria-label="Aurora palette">
<button v-for="(colors, id) in palettes" :key="id" type="button" class="amba-dot"
:aria-pressed="pal === id" :aria-label="id" :style="{ background: colors[0] }"
@click="pal = id" />
</div>
</div>
</section>
</template>
<style scoped>
.amba { position: relative; overflow: clip; border-radius: 1.25rem; min-block-size: 22rem;
display: grid; place-content: center; text-align: center; background: #0a1120; color: #f1f5f9; }
.amba-sky { position: absolute; inset: 0; }
.amba-blob { position: absolute; border-radius: 50%; filter: blur(64px); mix-blend-mode: screen; opacity: .55; }
.amba-blob.a { animation: amba-drift-a 26s ease-in-out infinite alternate; }
.amba-blob.b { animation: amba-drift-b 32s ease-in-out infinite alternate; }
.amba-blob.c { animation: amba-drift-c 24s ease-in-out infinite alternate; }
.amba-blob.d { animation: amba-drift-d 34s ease-in-out infinite alternate; }
@keyframes amba-drift-a { from { translate: -20% -30%; scale: 1; } to { translate: 15% 10%; scale: 1.25; } }
@keyframes amba-drift-b { from { translate: 60% 20%; scale: 1.2; } to { translate: 25% -25%; scale: .95; } }
@keyframes amba-drift-c { from { translate: 30% 70%; scale: .9; } to { translate: 55% 40%; scale: 1.3; } }
@keyframes amba-drift-d { from { translate: -35% 45%; scale: 1.1; } to { translate: -5% 60%; scale: .9; } }
.amba[data-running='false'] .amba-blob { animation-play-state: paused; }
.amba-copy { position: relative; padding: 2rem; }
.amba-dots { display: flex; gap: .5rem; justify-content: center; margin-block-start: 1.25rem; }
.amba-dot { inline-size: 2rem; block-size: 2rem; border-radius: 50%; border: 2px solid #f1f5f940; cursor: pointer; }
.amba-dot[aria-pressed='true'] { border-color: #f8fafc; }
@media (prefers-reduced-motion: reduce) { .amba-blob { animation: none; } }
</style>
<!-- AuroraHero.svelte — aurora background: blurred blobs drifting under a dark section -->
<script lang="ts">
import { onMount } from 'svelte';
import '@nabuxai/ui-core/css';
const palettes: Record<string, string[]> = {
borealis: ['#22d3ee', '#34d399', '#818cf8'],
sunset: ['#f97316', '#ec4899', '#8b5cf6'],
ocean: ['#38bdf8', '#6366f1', '#0ea5e9'],
};
const blobs = [
{ cls: 'a', size: '26rem' }, { cls: 'b', size: '32rem' },
{ cls: 'c', size: '22rem' }, { cls: 'd', size: '28rem' },
];
let pal = $state('borealis');
let running = $state(true);
let section: HTMLElement;
// Park the drift off screen; reduced-motion users get a still sky.
onMount(() => {
const io = new IntersectionObserver(([e]) => { running = e.isIntersecting; }, { threshold: 0.15 });
io.observe(section);
return () => io.disconnect();
});
</script>
<section bind:this={section} class="amba" data-running={running}
style={`--amba-c1:${palettes[pal][0]};--amba-c2:${palettes[pal][1]};--amba-c3:${palettes[pal][2]}`}>
<div class="amba-sky" aria-hidden="true">
{#each blobs as b, i (b.cls)}
<i class={`amba-blob ${b.cls}`} style={`inline-size:${b.size};block-size:${b.size};
inset-inline-start:${8 + i * 22}%;inset-block-start:${(i % 2) * 30}%;
background:${palettes[pal][i % 3]}`}></i>
{/each}
</div>
<div class="amba-copy">
<h2>Cold deploys under the aurora</h2>
<p>Edge compute in 31 cities — sub-50ms latency, zero config.</p>
<div class="amba-dots" role="group" aria-label="Aurora palette">
{#each Object.entries(palettes) as [id, colors] (id)}
<button type="button" class="amba-dot" aria-pressed={pal === id} aria-label={id}
style={`background:${colors[0]}`} onclick={() => (pal = id)}></button>
{/each}
</div>
</div>
</section>
<style>
.amba { position: relative; overflow: clip; border-radius: 1.25rem; min-block-size: 22rem;
display: grid; place-content: center; text-align: center; background: #0a1120; color: #f1f5f9; }
.amba-sky { position: absolute; inset: 0; }
.amba-blob { position: absolute; border-radius: 50%; filter: blur(64px); mix-blend-mode: screen; opacity: .55; }
.amba-blob.a { animation: amba-drift-a 26s ease-in-out infinite alternate; }
.amba-blob.b { animation: amba-drift-b 32s ease-in-out infinite alternate; }
.amba-blob.c { animation: amba-drift-c 24s ease-in-out infinite alternate; }
.amba-blob.d { animation: amba-drift-d 34s ease-in-out infinite alternate; }
@keyframes amba-drift-a { from { translate: -20% -30%; scale: 1; } to { translate: 15% 10%; scale: 1.25; } }
@keyframes amba-drift-b { from { translate: 60% 20%; scale: 1.2; } to { translate: 25% -25%; scale: .95; } }
@keyframes amba-drift-c { from { translate: 30% 70%; scale: .9; } to { translate: 55% 40%; scale: 1.3; } }
@keyframes amba-drift-d { from { translate: -35% 45%; scale: 1.1; } to { translate: -5% 60%; scale: .9; } }
.amba[data-running='false'] .amba-blob { animation-play-state: paused; }
.amba-copy { position: relative; padding: 2rem; }
.amba-dots { display: flex; gap: .5rem; justify-content: center; margin-block-start: 1.25rem; }
.amba-dot { inline-size: 2rem; block-size: 2rem; border-radius: 50%; border: 2px solid #f1f5f940; cursor: pointer; }
.amba-dot[aria-pressed='true'] { border-color: #f8fafc; }
@media (prefers-reduced-motion: reduce) { .amba-blob { animation: none; } }
</style>