Stardust Image
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.

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.
| Prop | Type | Default | Description |
|---|---|---|---|
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. |
className | string | — | Fills its parent, which should be positioned. The dust drifts anywhere inside it. |
frameClassName | string | — | Places the picture inside the parent. Give it a size and an aspect ratio. |
frameStyle | React.CSSProperties | — | Inline styles for the frame, such as its position and size. |
angle | number | 10 | Which way the dust drifts, in degrees: 0 is to the right, 90 is straight up. |
delay | number | 1200 | How 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. |
rebuild | boolean | true | Once nearly all the dust has gone, the wind brings it back in from the left and the picture comes back whole. |
duration | number | 3.6 | Seconds the picture takes to break up, from its first grains to its last, 0.5 to 8. Read when the scene is built. |
grain | number | 1 | Grain size, as a multiple of the size that just covers the picture. Read when the scene is built. |