PRO

Starfield Warp Scroll

A pinned canvas starfield where scroll drives the warp. A thousand weighted-color streaks fire out of a center hole, stretching and brightening the further they travel, while three headlines hand off word by word: one fades out as it swells past full size, the next fades in as it settles. Canvas 2D with GSAP ScrollTrigger, SplitText, and Lenis. No images.

Component

Buckle Up

The whole galaxy opens up

Leaving the known world behind

And then everything goes still

We're Home

Install
npx shadcn@latest add https://ui.aryank.space/r/starfield-warp-scroll.json

Installs from ui.aryank.space. To add it by hand, copy the files in Usage below, or register the @compronents namespace via the docs.

Files

API
PropTypeDefaultDescription
introHeading / headings / outroHeadingstring / [string, string, string] / stringBLANK copyCopy for the lead-in section, the three warp headlines, and the closing section.
starCountnumber1000Number of streaks in the field.
palette / paletteWeightsstring[] / number[]6 cyan-to-pink hexesStreak colors and the probability weight of each, sampled once per star at creation.
embeddedbooleantrueOwn the scroll container so it fits a bounded box. Set false to drive it from the window scroll.
Customize
headingstext

The three headlines that hand off across the warp.

palettecolor

Streak colors, sampled with per-color weights.

starCounttext

How many streaks are drawn each frame.

Dependencies
gsaplenis