Sunlight falling through swaying leaves onto a wall
| Name | Type | Default | Description |
|---|---|---|---|
plant | "ficus" | "olive" | "palm" | "fern" | "ficus" | The plant casting the shadows. Each has its own branch structure, leaf shape and way of moving in the wind. |
placement | "top-right" | "top-left" | "right" | "left" | "bottom-right" | "bottom-left" | "top-right" | Which edge the plant reaches in from. The rest of the frame stays clear for content. |
scale | number | 1 | Size of the plant. It scales down automatically on narrow screens. |
density | number | 1 | How many leaves each branch carries, and how large they are. |
depth | number | 0.7 | How far apart the branches hang from the wall. Branches farther from the wall cast softer, lighter shadows. |
softness | number | 1 | Overall softness of the shadows and the window light, like the size of the sun or a hazy sky. |
shadowStrength | number | 1 | How dark the shadows are on light backgrounds. |
lightColor | string | "auto" | Colour of the light on dark backgrounds. Auto uses a soft violet. |
shadowColor | string | "auto" | Colour of the shadows on light backgrounds. Auto uses a cool lavender grey. |
backgroundColor | string | "transparent" | Background of the component. Light backgrounds get shadows on a sunlit wall; dark backgrounds get light falling into a dark room. Transparent reads the colour behind the component. |
window | "auto" | "on" | "off" | "auto" | Frame the light as a window. Auto uses one on dark backgrounds only. Off on a dark background gives a soft pool of light instead. |
windowAngle | number | 28 | Angle of the window light in degrees. |
windowSize | number | 0.52 | Size of the window light, relative to the component height. |
intensity | number | 0.9 | Brightness of the light on dark backgrounds. |
bloom | number | 0.6 | Soft glow around the light on dark backgrounds. |
wind | number | 0.6 | Strength of the breeze moving the plant. 0 holds it still. |
windSpeed | number | 1 | Pace of the breeze. |
clouds | number | 0.25 | How often a cloud passes and softens the light for a moment. |
breeze | boolean | true | Moving the pointer stirs the plant in the direction of travel; clicking sends a gust through the branches. |
grain | number | 0.25 | Film grain in the light and shadows. The plain background stays clean. |
seed | number | 1 | Varies the arrangement of the leaves. |
intro | boolean | true | Bring the light and shadows into focus when the component first appears. |
paused | boolean | false | Stops the breeze. Reduced-motion users get still shadows. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
children | ReactNode | — | Content laid over the light, such as a hero headline. Clicks on its links and buttons never send gusts. |
ref | { gust, replay } | — | gust(strength?) sends a gust through the plant; replay() replays the intro. |
className | string | — | Classes for the root element. It fills its parent, with a 320px minimum height. |
style | CSSProperties | — | Inline styles for the root element. |
plant"ficus" | "olive" | "palm" | "fern"The plant casting the shadows. Each has its own branch structure, leaf shape and way of moving in the wind.
"ficus"placement"top-right" | "top-left" | "right" | "left" | "bottom-right" | "bottom-left"Which edge the plant reaches in from. The rest of the frame stays clear for content.
"top-right"scalenumberSize of the plant. It scales down automatically on narrow screens.
1densitynumberHow many leaves each branch carries, and how large they are.
1depthnumberHow far apart the branches hang from the wall. Branches farther from the wall cast softer, lighter shadows.
0.7softnessnumberOverall softness of the shadows and the window light, like the size of the sun or a hazy sky.
1shadowStrengthnumberHow dark the shadows are on light backgrounds.
1lightColorstringColour of the light on dark backgrounds. Auto uses a soft violet.
"auto"shadowColorstringColour of the shadows on light backgrounds. Auto uses a cool lavender grey.
"auto"backgroundColorstringBackground of the component. Light backgrounds get shadows on a sunlit wall; dark backgrounds get light falling into a dark room. Transparent reads the colour behind the component.
"transparent"window"auto" | "on" | "off"Frame the light as a window. Auto uses one on dark backgrounds only. Off on a dark background gives a soft pool of light instead.
"auto"windowAnglenumberAngle of the window light in degrees.
28windowSizenumberSize of the window light, relative to the component height.
0.52intensitynumberBrightness of the light on dark backgrounds.
0.9bloomnumberSoft glow around the light on dark backgrounds.
0.6windnumberStrength of the breeze moving the plant. 0 holds it still.
0.6windSpeednumberPace of the breeze.
1cloudsnumberHow often a cloud passes and softens the light for a moment.
0.25breezebooleanMoving the pointer stirs the plant in the direction of travel; clicking sends a gust through the branches.
truegrainnumberFilm grain in the light and shadows. The plain background stays clean.
0.25seednumberVaries the arrangement of the leaves.
1introbooleanBring the light and shadows into focus when the component first appears.
truepausedbooleanStops the breeze. Reduced-motion users get still shadows.
falsedprnumberMaximum device pixel ratio for the canvas.
2childrenReactNodeContent laid over the light, such as a hero headline. Clicks on its links and buttons never send gusts.
—ref{ gust, replay }gust(strength?) sends a gust through the plant; replay() replays the intro.
—classNamestringClasses for the root element. It fills its parent, with a 320px minimum height.
—styleCSSPropertiesInline styles for the root element.
—