Skip to content

Nebula Text Halo

Crisp text over a drifting, reactive colour field.

LIVE PREVIEWInteract with the component
Install dependencies

npm install three @react-three/fiber @react-three/drei

CSS Modules

Usage

Matches your current playground settings.

jsx
import NebulaTextHalo from "./NebulaTextHalo";
export default function Example() {
return (
<NebulaTextHalo
text={"Out of the ordinary."}
accentText={""}
colors={[
"#09080f",
"#5931b7",
"#ca6eb0"
]}
intensity={0.55}
tilt={0.35}
parallax={0.65}
textColor={"#f3efff"}
fontSize={"clamp(2rem, 5vw, 4.5rem)"}
/>
);
}

Using Nebula Text Halo

Supply the main heading through text and optional supporting copy through accentText. minHeight reserves space for the halo.

Adjust textColor independently of the background palette. Reduce intensity when the heading needs stronger contrast.

Props

NameTypeRequiredDefaultDescription
textstringNo""Main text rendered over the animated colour field.
accentTextstringNo""Optional smaller line rendered beneath the main title, useful for taglines or callouts.
classNamestringNoundefinedAdditional CSS class names, merged with base component styles.
colorsstring[]No["#020617", "#22d3ee", "#e879f9"]Array of up to three hex colors used to paint the nebula backdrop from base to accent.
intensitynumberNo0.8Overall brightness and strength of the nebula glow. Lower values feel softer and more subtle.
tiltnumberNo1How dramatically the headline tilts in 3D as you move the pointer.
parallaxnumberNo1How far the glow and nebula respond to pointer movement for a parallax feel.
minHeightnumberNo260Min Height.
textColorstringNo"#f3efff"Foreground text colour.
fontSizestringNoclamp(2rem, 5vw, 4.5rem)CSS font size for the headline.

Related components

Split Text

Text Effects

A staggered character reveal as text enters the viewport.

Reflection Text

Text Effects

Crisp typography meets a soft, fading reflection beneath the baseline.