
Long shadow letters
Text, Scroll, 3D
Scroll inside the preview
The opening of an astronomy app, on a photographic night sky we made on a canvas: thousands of stars with their real colours and a soft bloom, the Milky Way as a cloud with its dark dust, the glow of the horizon and the grain. Scrolling, the letters of the headline ‘See the sky the way it was’ light up one by one like stars, and a thin constellation line joins each to the nearest lit letter; the sky turns slowly around the pole star leaving trails behind the brightest stars, and at the end a glass card with Saturn, visible at 23:40, rises from the bottom.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Constellation headline" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The observatory headline that lights up into a constellation</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/opsz.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the opening of a made-up observatory app, Kestrel. A night sky photographed by us on a canvas: thousands of stars
with their real colours and a soft bloom, the Milky Way as a soft cloud with its dust lanes, the glow of the
horizon and a veil of grain. Scrolling, the letters of the headline light up one by one like stars and a thin
constellation line joins each new one to the nearest lit letter; the sky turns slowly around Polaris, the
brightest stars leave a trail, and a glass card with tonight's sighting rises from the bottom. -->
<main>
<section class="hero" data-hero>
<div class="stage" data-stage>
<canvas class="sky" data-sky aria-hidden="true"></canvas>
<div class="grain" aria-hidden="true"></div>
<div class="vignette" aria-hidden="true"></div>
<div class="polaris" data-polaris aria-hidden="true">
<svg class="polaris__ring" viewBox="0 0 40 40"><circle cx="20" cy="20" r="17"/></svg>
<span class="polaris__name">Polaris</span>
</div>
<header class="nav" data-nav>
<a class="brand" href="#">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="10.25"/>
<path d="M4.2 15.6a8.6 8.6 0 0 1 15.6 0"/>
<path d="M12 5.4v2.4M12 5.4l1.1 1.1M12 5.4l-1.1 1.1"/>
</svg>
<span>Kestrel</span>
</a>
<nav class="nav__links" aria-label="Main">
<a href="#">Tonight</a>
<a href="#">Sky atlas</a>
<a href="#">Archive</a>
</nav>
<a class="pill" href="#"><span>Open the app</span></a>
</header>
<div class="copy" data-copy>
<p class="eyebrow" data-eyebrow>Kestrel Ridge Observatory</p>
<h1 class="title" data-title aria-label="See the sky the way it was">
<span class="title__line">See the sky</span>
<span class="title__line">the way it was</span>
</h1>
<p class="lede" data-lede>Every night above the ridge since 1912, rewound to the minute.</p>
<svg class="links" data-links aria-hidden="true"></svg>
</div>
<p class="hint" data-hint>
<svg class="hint__arrow" data-arrow viewBox="0 0 12 16" aria-hidden="true"><path d="M6 1v13M1.5 9.5 6 14l4.5-4.5"/></svg>
<span>Scroll to light the sky</span>
</p>
<div class="dock" data-dock>
<article class="card" data-card>
<span class="card__sheen" data-sheen aria-hidden="true"></span>
<div class="card__main">
<svg class="planet" viewBox="0 0 48 48" aria-hidden="true" data-in>
<defs>
<linearGradient id="pl-body" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#f4e2bd"/>
<stop offset=".55" stop-color="#c9a571"/>
<stop offset="1" stop-color="#5e4528"/>
</linearGradient>
<linearGradient id="pl-ring" x1="0" y1="0" x2="1" y2="0">
<stop offset="0" stop-color="#e9dcc1" stop-opacity=".25"/>
<stop offset=".35" stop-color="#f3e7cf" stop-opacity=".95"/>
<stop offset="1" stop-color="#9c8562" stop-opacity=".5"/>
</linearGradient>
<clipPath id="pl-front"><rect x="0" y="24" width="48" height="24"/></clipPath>
</defs>
<ellipse cx="24" cy="24" rx="21" ry="6.2" transform="rotate(-16 24 24)" fill="none" stroke="url(#pl-ring)" stroke-width="2.6" opacity=".55"/>
<circle cx="24" cy="24" r="10.5" fill="url(#pl-body)"/>
<path d="M14.6 21.4c6 1.3 12.8 1.3 18.8 0M14 25.6c6.4 1.4 13.6 1.4 20 0" stroke="#7d5f3a" stroke-opacity=".35" stroke-width=".8" fill="none"/>
<g clip-path="url(#pl-front)" transform="rotate(-16 24 24)">
<ellipse cx="24" cy="24" rx="21" ry="6.2" fill="none" stroke="url(#pl-ring)" stroke-width="2.6"/>
</g>
</svg>
<div class="card__text">
<p class="card__label" data-in>Visible tonight</p>
<p class="card__title" data-in>Saturn<span class="card__comma">,</span> <b class="card__time" data-time>23:40</b></p>
<p class="card__meta" data-in>Rises in the southeast, highest after midnight</p>
</div>
</div>
<svg class="chart" data-chart viewBox="0 0 220 86" aria-hidden="true">
<defs>
<linearGradient id="ch-fill" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#cfdcff" stop-opacity=".18"/>
<stop offset="1" stop-color="#cfdcff" stop-opacity="0"/>
</linearGradient>
</defs>
<path class="chart__fill" data-fill d="M10 66 C 50 66, 70 14, 110 14 S 170 66, 210 66 Z" fill="url(#ch-fill)"/>
<line class="chart__horizon" x1="4" y1="66.5" x2="216" y2="66.5"/>
<path class="chart__arc" data-arc d="M10 66 C 50 66, 70 14, 110 14 S 170 66, 210 66"/>
<line class="chart__now" data-now x1="88" y1="66.5" x2="88" y2="20"/>
<g class="chart__mark" data-mark transform="translate(88 20.5)">
<circle r="5.5" class="chart__mark-halo"/>
<circle r="2.6" class="chart__mark-dot"/>
</g>
<text class="chart__tick" x="10" y="82">20:00</text>
<text class="chart__tick chart__tick--now" x="88" y="82" text-anchor="middle">23:40</text>
<text class="chart__tick" x="210" y="82" text-anchor="end">05:10</text>
</svg>
<ul class="stats">
<li data-in><span>Altitude</span><b>38°</b></li>
<li data-in><span>Magnitude</span><b>0.8</b></li>
<li data-in><span>Seeing</span><b>Steady</b></li>
</ul>
</article>
</div>
</div>
</section>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
47 values to change
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Constellation headline” from Animorio and fit it into my siteThe section is 380vh tall and holds a sticky stage 100vh tall (100lvh where available): everything happens there, driven by the share of the page scrolled, damped every frame so it follows the scroll with a slight delay. Lenis makes the scrolling smooth.
The stars live in polar coordinates around Polaris (radius and angle), with mostly faint brightness and a few strong ones, and a colour taken from five temperatures. Each is drawn with a ready-made sprite, a sharp core and a soft bloom. The Milky Way is a small canvas painted with hundreds of soft blobs along a curved band, with the dust cut out in filaments, and it is drawn large: the stretch softens it like a lens.
Every frame the sky turns around Polaris by an angle made of the scroll plus a slow drift over time: the stars add the angle, the Milky Way only needs a rotation of the context. The brightest stars draw an arc behind them, as long as the scroll's rotation, in four fading strokes: the long exposure.
The headline is split into letters. Each letter gets a point inside its shape and the nearest lit letter among those before it: so the constellation grows like a tree, not a line. The scroll first carries the line from the old point to the new one, then lights the letter: colour, a text-shadow glow, the small star with a back.out and a flash that fades in 1.5 seconds.
When the scroll passes 70% a GSAP timeline starts: the card rises with back.out and a slight perspective tilt, the lines arrive staggered, the time rolls, the curve draws itself with stroke-dashoffset, the 23:40 mark opens and a reflection crosses the glass. Scrolling back the timeline reverses, faster. If needed, the headline rises just enough not to sit under the card.
| Name | File | Default | What it changes |
|---|---|---|---|
RIDE | script.js | 1 | How much scroll the whole sequence takes: 2 is twice as long. |
TURN | script.js | 26 | How many degrees the sky turns around Polaris over the whole scroll. |
DRIFT | script.js | 0.12 | Degrees per second the sky turns on its own. |
STARS | script.js | 1 | How many stars there are. |
MILKY | script.js | 1 | How bright the Milky Way is. |
TRAILS | script.js | 0.6 | How visible the star trails are (0 = none). |
TWINKLE | script.js | 1 | How much the bright stars twinkle. |
GLOW | script.js | 1 | How much a lit letter glows. |
LINE | script.js | 0.6 | How visible the constellation line is. |
CARD_AT | script.js | 0.7 | At what share of the scroll the card rises. |
POLE_X | script.js | 0.8 | Where Polaris sits, as a share of the width. |
POLE_Y | script.js | 0.15 | Where Polaris sits, as a share of the height. |
As the opening of an astronomy or night-sky app, an observatory, a planetarium, a science museum, a mountain hut or a campsite under a dark sky, a stargazing event or a brand that lives at night. The colours are in :root (--night, --star, --line, --accent), the text is in the HTML headline.
The same animations at adapted sizes: the headline is measured on width and height, the sky is redrawn to the screen with stars in proportion to its area, the bar keeps the mark and the pill, the card drops the curve and keeps the planet, the time and the three figures; on short screens the line under the headline and the scroll hint disappear.
The sky is still and does not twinkle, with no trails; scrolling, the letters, the small stars and the lines fade in, already in place, and the card fades in with the curve already drawn. The headline is already where it belongs.
GSAP 3.15.0, Lenis 1.3.26, Fraunces (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 14 KB; the libraries: GSAP 28 KB, Lenis 5.3 KB.
Tested on 4 November 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.