Starlight River

ProBackgroundsWebGLpowered by @vectorvesper/motion

A river of fine strands and glitter that runs down one side of a hero, drawn as a long exposure, so the light keeps flowing and never repeats. Your hero sits over the open side, and the river can be flipped to either side.

Starlight River
Preview of Starlight River

Included with membership

Members install Starlight River with one command and get the full source, the usage code and the Framer remix, licensed for client work. One membership covers the whole library and the CLI.

When to use it

A dark hero that should feel alive without asking for attention: a fragrance, a jewellery line, an album, a night-time launch. It fills the element it is in, so give that a height, or pass a class that positions it.

  • Give the element it is in a height. The river fills it.
  • Pass a poster for visitors who prefer reduced motion. A screenshot of the river works well.
  • Keep your copy on the left, the side the river leaves open.
  • On narrow screens the river runs behind the copy, so lay a dark gradient between them to keep small text readable.

Avoid:

  • Do not put it inside an element with no height. The river has nothing to fill and shows nothing.
  • Do not put it on a light ground. The river is light added to black, and on a pale background the strands disappear.

Props

A river of fine strands and glitter that runs down one side of a hero, drawn as a long exposure. Each frame adds a little new light while the old light fades, so the river keeps flowing and never settles into a loop. Your hero sits over the open side.

<StarlightRiver />

The river, with your hero laid over it. Fills its parent, positioned relative, on black. A class you pass wins over those, so one that positions it works.

PropTypeDefaultDescription
flowSpeednumber1How fast the light travels down the river.
introbooleantruePour the river in when it first appears.
posterstring—Image shown where the scene cannot run: reduced motion, or a device below the floor.
classNamestring—Class for the outer element.
childrenReact.ReactNode—Your hero, over the open side of the river.
Visitors who prefer reduced motion see the poster, and nothing moves. So do devices below the runtime's floor, and the few whose graphics cannot hold the long exposure.
Each frame draws only a small batch of new strands and grains onto a picture that holds over a hundred thousand, so the cost stays the same however rich the river gets. At reduced quality the batches halve and it draws at a lower resolution. Off screen it does no work.
Client component. The server renders the element and your hero, and the river starts in the browser.
Back to all components