Stars rising from beyond the frame on trails that fade behind them
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#5227FF", "#FF9FFC"] | Trail colour and head colour. The end of each trail warms toward the head colour, and distant stars blend the two in OKLab. On light backgrounds both are deepened into ink tones. |
backgroundColor | string | "#0a0a0a" | Colour behind the stars. |
mode | "auto" | "glow" | "ink" | "auto" | glow adds light for dark backgrounds, ink draws fine dark lines for light ones. auto picks from the background brightness. |
direction | "up" | "down" | "left" | "right" | "out" | "up" | Direction the stars travel. up, down, left and right stream from an origin beyond the opposite edge; out radiates in every direction from the centre. |
spread | number | 150 | Width of the fan in degrees, from 1 to 180. Ignored by out, which always covers 360°. |
focus | number | 0.35 | How strongly stars gather toward the centre line of the fan, from 0 (even) to 1. |
originOffset | number | 0.18 | How far beyond the edge the origin sits, as a fraction of the frame's shorter side. Larger values make the rays more parallel. |
originShift | number | 0 | Position of the origin along its edge, from -1 (left or top) to 1 (right or bottom). With out it moves the centre horizontally. |
count | number | 480 | Number of stars in a 1280×720 frame, up to 3,000. Smaller frames show proportionally fewer. |
speed | number | 0.16 | Base travel speed, in frame lengths per second along the direction of travel. |
speedVariance | number | 0.6 | How much speed differs from star to star, from 0 (all equal) to 1. |
acceleration | number | 0.9 | Warp acceleration: stars gather speed as they move away from the origin, from 0 to 4. |
trailLength | number | 0.45 | Trail length as a fraction of the frame at base speed. Trails scale with each star's current speed, so faster stars streak longer. |
trailFade | number | 1.6 | Falloff along each trail from head to tail. Higher values give shorter, sharper tails. |
lineWidth | number | 1 | Width of the trails in pixels. Distant stars draw thinner. |
starSize | number | 2.2 | Diameter of the star heads in pixels. 0 hides them. |
twinkle | number | 0.35 | How much the heads shimmer, from 0 to 1. |
fadeIn | number | 0.06 | Share of the path over which a star fades in after entering the frame, from 0 to 1. |
fadeOut | number | 0.3 | Share of the path over which a star fades out before reaching the far edge, from 0 to 1. At 0 stars leave the frame instead. |
depth | number | 0.5 | Share of stars that sit further back: smaller, dimmer and slower, for parallax. From 0 to 1. |
glow | number | 0.45 | Soft halo around the brightest heads, from 0 to 3. |
intensity | number | 1 | Overall exposure. |
grain | number | 0.3 | Fine film grain on lit areas, from 0 to 1. The background stays clean. |
interactive | boolean | true | Respond to the pointer. |
thrust | number | 1 | Moving the pointer over the stars speeds up the flow in proportion to pointer speed, stretching the trails, then it eases back over about a second. From 0 to 3. |
burst | number | 64 | Clicking or tapping launches a shell of this many stars at once, which rises as an expanding arc. Bursts stack. 0 turns it off. |
paused | boolean | false | Freeze the stars. Reduced-motion users always get a still frame. |
quality | number | 1 | Resolution and star count scale from 0.25 to 1. Lower values are cheaper on large screens. |
ref | { burst } | — | burst() launches a shell of stars, for example when a form is submitted. |
children | ReactNode | — | Content placed over the stars. |
className | string | — | Classes for the root element. It fills its parent, with a 240px minimum height. |
style | CSSProperties | — | Inline styles for the root element. |
colors[string, string]Trail colour and head colour. The end of each trail warms toward the head colour, and distant stars blend the two in OKLab. On light backgrounds both are deepened into ink tones.
["#5227FF", "#FF9FFC"]backgroundColorstringColour behind the stars.
"#0a0a0a"mode"auto" | "glow" | "ink"glow adds light for dark backgrounds, ink draws fine dark lines for light ones. auto picks from the background brightness.
"auto"direction"up" | "down" | "left" | "right" | "out"Direction the stars travel. up, down, left and right stream from an origin beyond the opposite edge; out radiates in every direction from the centre.
"up"spreadnumberWidth of the fan in degrees, from 1 to 180. Ignored by out, which always covers 360°.
150focusnumberHow strongly stars gather toward the centre line of the fan, from 0 (even) to 1.
0.35originOffsetnumberHow far beyond the edge the origin sits, as a fraction of the frame's shorter side. Larger values make the rays more parallel.
0.18originShiftnumberPosition of the origin along its edge, from -1 (left or top) to 1 (right or bottom). With out it moves the centre horizontally.
0countnumberNumber of stars in a 1280×720 frame, up to 3,000. Smaller frames show proportionally fewer.
480speednumberBase travel speed, in frame lengths per second along the direction of travel.
0.16speedVariancenumberHow much speed differs from star to star, from 0 (all equal) to 1.
0.6accelerationnumberWarp acceleration: stars gather speed as they move away from the origin, from 0 to 4.
0.9trailLengthnumberTrail length as a fraction of the frame at base speed. Trails scale with each star's current speed, so faster stars streak longer.
0.45trailFadenumberFalloff along each trail from head to tail. Higher values give shorter, sharper tails.
1.6lineWidthnumberWidth of the trails in pixels. Distant stars draw thinner.
1starSizenumberDiameter of the star heads in pixels. 0 hides them.
2.2twinklenumberHow much the heads shimmer, from 0 to 1.
0.35fadeInnumberShare of the path over which a star fades in after entering the frame, from 0 to 1.
0.06fadeOutnumberShare of the path over which a star fades out before reaching the far edge, from 0 to 1. At 0 stars leave the frame instead.
0.3depthnumberShare of stars that sit further back: smaller, dimmer and slower, for parallax. From 0 to 1.
0.5glownumberSoft halo around the brightest heads, from 0 to 3.
0.45intensitynumberOverall exposure.
1grainnumberFine film grain on lit areas, from 0 to 1. The background stays clean.
0.3interactivebooleanRespond to the pointer.
truethrustnumberMoving the pointer over the stars speeds up the flow in proportion to pointer speed, stretching the trails, then it eases back over about a second. From 0 to 3.
1burstnumberClicking or tapping launches a shell of this many stars at once, which rises as an expanding arc. Bursts stack. 0 turns it off.
64pausedbooleanFreeze the stars. Reduced-motion users always get a still frame.
falsequalitynumberResolution and star count scale from 0.25 to 1. Lower values are cheaper on large screens.
1ref{ burst }burst() launches a shell of stars, for example when a form is submitted.
—childrenReactNodeContent placed over the stars.
—classNamestringClasses for the root element. It fills its parent, with a 240px minimum height.
—styleCSSPropertiesInline styles for the root element.
—