Built for Motion
Log in

3D Lotus Bloom Hero with a Pointer Sun and Real Shadows in Three.js

proOn LoadOn ScrollMouse MoveOn HoverOn Click
Loading preview

Overview

A botanical hero section for React and Next.js. Three lotus flowers and their leaves, modelled entirely in code in Three.js, grow up into the frame and bloom petal by petal in front of a giant wordmark. The pointer is the sun, so their soft shadows swing across the paper and the letters, and a click opens a bud or closes a flower.

The page opens at dawn. The wordmark's letters rise out of their masks while the light comes up from low on the left, the lotus leaves and stalks grow up into the frame from below, and then the flowers open: the green sepals fold down first, then each ring of petals leans out after the one before it until the seed pod and its fringe of golden stamens show. The headline, the notes and the call to action follow.

Details

Category
Hero
Interaction
On Load + On Scroll + Mouse Move + On Hover + On Click
Trigger
On Load
Languages
React, TypeScript, plain CSS

(01)Keep exploring

All 152 components

Built with the same techniques

(02)FAQ

3D Lotus Bloom Hero with a Pointer Sun and Real Shadows in Three.js — FAQ

01What do I need to install?

npm install three gsap @gsap/react. The styles are plain CSS scoped to .lotus-hero, so it doesn't need Tailwind. The example's stand-in section below the hero uses Tailwind classes, but that's only the demo.

02Which fonts does it use?

Pass them as CSS variables: --lh-display for the wordmark (the example uses Archivo with its width axis, set black and narrowed), --lh-serif for the headline (Cormorant Garamond) and --lh-sans for the small capitals (Manrope). Each falls back to a system face.

03Does it need any image files?

No. The flowers, leaves, seed pods and stamens are all built in code, and the leaf surface is painted on a canvas when the page loads.

04How do I change the words and colours?

Every word is a prop: wordmark, title, text, cta, links, action and notes. The page colours are paper, ink, lilac and lilacInk, and the pond prop overrides any colour of the flowers, leaves, stalks, shadows, pollen and sunlight.

05How do I move the flowers?

The pond fits itself inside the .lh-anchor box, so changing that box's position and size in the CSS recomposes it at any screen size. On phones it switches to a tighter crop around the flowers.

06Is it heavy?

It's one canvas with three flowers, six leaves and one shadow-casting light. The petals of each flower are a single instanced draw shaped on the GPU, the canvas resolution is capped by maxDpr (1.75 by default), and nothing renders while the hero is off screen.

07What happens with reduced motion or without WebGL?

With reduced motion the flowers are already open, nothing sways or drifts, the light still follows the pointer and a click still opens or closes a flower, instantly. Without WebGL a flat drawn lotus takes the pond's place and the rest of the hero works as usual.