Jelly Stars
A background of gummy 3D stars that fall from just in front of the camera onto the page, land, wobble like jelly and settle into a pile. A click drops a few more where you click.
Included with membership
Members install Jelly Stars 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 playful hero, a launch or a celebration page. The page colour and the stars' colours are yours to set.
- Give it a height, usually the screen's, with style or className.
- Set background to your page colour, so the stars' reflections match it.
Avoid:
- Do not put two on one page. Each draws a full scene with shadows.
Props
A background of gummy 3D stars that fall from just in front of the camera onto the page, land, wobble like jelly and settle into a pile. A click drops a few more where you click.
<JellyStars />
A background of gummy 3D stars that fall from just in front of the camera onto the page, land, wobble like jelly and settle into a pile.
| Prop | Type | Default | Description |
|---|---|---|---|
count | number | 36 | Stars in the first shower. |
perClick | number | 6 | Stars each click adds. |
colors | string[] | seven pastels | The colours each new star is picked from, as hex, rgb(), hsl() or a colour name. |
background | string | "#eec9c6" | The page colour behind the stars. The stars' reflections keep the first colour given. |
size | number | 1 | Star size multiplier. |
wobble | number | 1 | How much a star wobbles when it lands, 0 to 2. |
gravity | number | 1 | How hard the stars fall, as a multiple of their own weight. |
interactive | boolean | true | Whether a click drops more stars. |
shadows | boolean | true | Whether the stars cast soft shadows on the page. Off draws less. Read when the scene is built. |
className | string | — | Class for the outer element, which the stars fill. |
style | React.CSSProperties | — | Styles for the outer element, applied after its own, so a height or `position: absolute` set here wins. |
children | React.ReactNode | — | Content laid over the stars. A click on it drops stars too. |