Stardust Image

ProShowcase & MediaWebGLpowered by @vectorvesper/motion

A picture that turns to dust. Once it is in view it holds for a moment, then crumbles into glowing grains that drift away on the wind, and the wind brings them back to make the picture whole again.

Stardust Image
Preview of Stardust Image

Included with membership

Members install Stardust Image 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 portrait, a product shot or a closing image on a dark page. A picture on black, or cut out with transparency, leaves only the subject.

  • Give the parent a position and a height. The dust drifts anywhere inside it.
  • Size and place the picture with frameClassName or frameStyle, with an aspect ratio.
  • Describe the picture in alt.

Avoid:

  • Do not use it on a light page. The picture is screened onto the page, so black drops away and light grounds wash it out.

Props

A picture that turns to dust. Once it is in view it holds for a moment, then crumbles into glowing grains that drift away on the wind, and the wind brings them back to make the picture whole again.

<StardustImage />

A picture that turns to dust.

PropTypeDefaultDescription
src*string—The picture. It is screened onto the page, so it is made for a dark page: black drops away and the dust glows. A photo on a black backdrop, or cut out with transparency, leaves only the subject.
alt*string—Describes the picture for screen readers.
classNamestring—Fills its parent, which should be positioned. The dust drifts anywhere inside it.
frameClassNamestring—Places the picture inside the parent. Give it a size and an aspect ratio.
frameStyleReact.CSSProperties—Inline styles for the frame, such as its position and size.
anglenumber10Which way the dust drifts, in degrees: 0 is to the right, 90 is straight up.
delaynumber1200How long the picture holds once it is in view before it starts to go, in ms.
onDone() => void—Called once the last of the dust has gone.
rebuildbooleantrueOnce nearly all the dust has gone, the wind brings it back in from the left and the picture comes back whole.
durationnumber3.6Seconds the picture takes to break up, from its first grains to its last, 0.5 to 8. Read when the scene is built.
grainnumber1Grain size, as a multiple of the size that just covers the picture. Read when the scene is built.
Visitors who prefer reduced motion get a still in place of the moving scene. Devices below the runtime's floor get the same.
It runs on the shared frame loop, and the runtime lowers the resolution when frames run long. It stops drawing while it is off screen.
Client component. The server renders the box and anything inside it, and the scene is built in the browser.
Back to all components