Aurora text
Also called animated gradient text, moving gradient text, or liquid gradient text
Headline text filled with soft blobs of color that drift slowly inside the letters, like northern lights seen through a stencil.
import { useEffect, useRef } from 'react';
import { useInView, useReducedMotion } from 'motion/react';
// Soft blobs over a solid base, so no letter is ever left empty.
const BLOBS = ['#9333ea', '#14b8a6', '#ec4899', '#1d4ed8'];
const BASE = '#2563eb';
// Each blob drifts on its own slow path: [x speed, y speed] in radians/s.
const SPEEDS: [number, number][] = [
[0.31, 0.47],
[0.43, 0.29],
[0.23, 0.53],
[0.37, 0.41]
];
export function AuroraText({ children }: { children: string }) {
const ref = useRef<HTMLSpanElement>(null);
const inView = useInView(ref);
const reduceMotion = useReducedMotion();
useEffect(() => {
const element = ref.current;
if (!element || !inView || reduceMotion) return;
let frame = 0;
const tick = (now: number) => {
const t = now / 1000;
element.style.backgroundPosition = [
...SPEEDS.map(
([fx, fy], i) =>
`${50 + 60 * Math.sin(t * fx + i * 1.7)}% ${50 + 50 * Math.sin(t * fy + i)}%`
),
'0 0'
].join(', ');
frame = requestAnimationFrame(tick);
};
frame = requestAnimationFrame(tick);
return () => cancelAnimationFrame(frame);
}, [inView, reduceMotion]);
return (
<span
ref={ref}
className='bg-clip-text pb-[0.1em] font-bold text-transparent'
style={{
backgroundImage: [
...BLOBS.map((c) => `radial-gradient(closest-side, ${c}, transparent)`),
`linear-gradient(${BASE}, ${BASE})`
].join(', '),
backgroundSize: '55% 160%, 50% 150%, 45% 170%, 60% 140%, 100% 100%',
backgroundRepeat: 'no-repeat',
// The still frame, used until the loop starts and for reduced motion.
backgroundPosition: '15% 60%, 85% 20%, 45% 90%, 70% 40%, 0 0'
}}
>
{children}
</span>
);
}Make the word "unforgettable" in the hero headline aurora text: fill it with a solid blue base plus four soft radial-gradient blobs in purple, teal, pink, and deep blue, each about half the word wide, clip the fill to the letters with background-clip: text and a transparent text color, and drift each blob on its own slow sine path so the mix takes 15 to 25 seconds to come around. Use bold 60px type, pause the loop while the headline is off-screen, and keep a still frame when prefers-reduced-motion is set.
Paste into Layerwise or any AI coding tool.
What is Aurora text?
Aurora text clips a moving, multicolor fill to the letters. The fill is a few soft color blobs, usually radial-gradient layers that fade to transparent, drifting on slow, independent paths over a solid base color. The text color is transparent, and background-clip: text lets the fill show only where the letters are.
Use it on one short phrase in a hero headline, where a living fill draws the eye without moving the layout. Bold weights and large sizes give the blobs room to show; on thin or small text the colors turn to mush.
Keep a solid base color under the blobs so no letter ever goes blank, and check contrast at the lightest blob. Animating background-position repaints the text on every frame, which is fine for one headline. Stop the loop while the headline is off-screen, and show a still mix of colors when someone prefers reduced motion.
Often confused with
- Gradient text
- Gradient text is a still blend of two or three colors. Aurora text moves soft blobs of color around inside the letters.
- Animated gradient
- An animated gradient moves colors across a background behind content. Aurora text clips the moving colors to the letters.
Related terms
All termsGradient text
Text filled with a color gradient instead of a solid color, made by painting a gradient background and clipping it to the shape of the letters.
Aurora background
A background of soft, blurred color ribbons that drift slowly, like the northern lights, used behind hero sections and landing pages.
Animated gradient
A color gradient that slowly shifts across a surface on a loop, often used behind a hero or call to action to add warmth and motion.
Shimmer text
Text with a band of light sweeping across it on a loop, often used for "Thinking…" and other status labels while an app is working.
Build it with Layerwise
Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.