Skip to content

Constellation Field

Fine star maps drift and twinkle behind your content.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import ConstellationField from "./ConstellationField";
export default function Example() {
return (
<ConstellationField
color={"#b1c7e3"}
background={"#101923"}
count={55}
speed={45}
paused={false}
minHeight={400}
children={"Somewhere beyond."}
style={{
"fontSize": 42,
"color": "#dfe9f3",
"letterSpacing": "-.05em"
}}
/>
);
}

Using Constellation Field

Place foreground content in children and use minHeight to size the star field. count controls how dense the connected star map becomes.

Use paused for a still composition. Check text contrast against both the brightest stars and the background colour.

Props

NameTypeRequiredDefaultDescription
colorstringNo"#aec3dc"Colour of stars and connecting lines.
backgroundstringNo"#111923"Background colour.
countnumberNo45Number of deterministic stars, clamped to 8–90.
speednumberNo45Duration of the slow sky drift in seconds.
pausedbooleanNofalsePause decorative motion.
minHeightnumber | stringNo360Minimum height of the bounded background.
childrenReactNodeNoundefinedYour foreground content.
classNamestringNo""Additional classes for the root element.
styleCSSPropertiesNoundefinedInline styles for caller-defined size, typography, and appearance.

Related components

Lava Lamp

Backgrounds

Warm liquid forms merge and drift inside a softly lit glass lamp.

Helix Field

Backgrounds

Two strands of shaded particles rotate around fine connecting rungs.

Wave Lattice

Backgrounds

A fine perspective mesh drifts over a sculpted wave surface.

Kinetic Mobile

Backgrounds

Suspended discs, rings and counterweights sway on fine connecting rods.