Physics Gravity Landing Page
What it does
A full-viewport hero for a cinematic frame archive (Freefall) where twelve scattered film-still tiles toggle between a floating grid and a physics drop. A [ Release / Restore ] button switches Matter.js gravity on so the rectangles fall, tumble and pile on a floor with restitution and friction, then a manual eased requestAnimationFrame lerp glides them back to their start positions. GSAP simultaneously animates the overlay clip-path, the huge 'Freefall' headline font-size/left, button color and the reveal of the nav link columns.
How it's built
| Category | interactive |
|---|---|
| Tech | gsap, matter-js |
| Complexity | page |
| Performance cost | heavy |
| Mobile-safe | yes |
Rebuild it with AI
This component's prompt is part of the paid library. Below you can read how it starts; the full prompt, the exact structure, timing and easing an AI agent needs to rebuild the effect, unlocks with any paid plan, yearly or lifetime.
# Physics Gravity Landing Page (Matter.js drop + GSAP overlay)
## Goal
Build a full-viewport, single-screen hero where **twelve small image tiles** (90×60px each, thin black border) are scattered across a flat acid-lime panel. A `[ Drop / Raise ]` button in the top-right toggles real physics: on **Drop**, Matter.js gravity switches on and all twelve tiles **fall, tumble with random spin, bounce and pile up on an invisible floor** at the bottom. On **Raise**, gravity switches off and a manual eased `requestAnimationFrame` lerp **glides every tile back to its exact starting position and 0° angle**. In sync with the drop, GSAP animates the lime overlay's `clip-path` (collapsing it into a thin band at the bottom), grows and re-positions the giant `Freefall` headline, flips the toggle button's color, and reveals four columns of footer nav links from behind a clip mask. Raising reverses all of it. The whole thing is one screen — no scroll.
## Tech
Vanilla HTML/CSS/JS with ES module imports (Vite-style npm imports). Use:
- `gsap` (npm) — for all the overlay/headline/text/button tweens. **No GSAP plugins** (no ScrollTrigger, no SplitText — text splitting is done by hand).
- `matter-js` (npm) — the physics engine. Destructure `const { Engine, Runner, World, Bodies, Body, Events } = Matter;`.
```js
import gsap from "gsap";
import Matter from "matter-js";
```
No smooth-scroll library, no canvas, no WebGL. Matter.js runs **headless** (no `Render`) and its bodies drive the DOM tiles via inline `style.top/left/transform` on every `afterUpdate` tick. All code runs at module top level (no `DOMContentLoaded` wrapper needed since the module is loaded at end of `<body>`).
…
Premium prompt
Unlock this prompt, and every other one
From $99/year, or $139 once for lifetime access. Commercial license included.
See pricing Or start with the free set Already bought? Sign in
New components in your inbox
One email a week, only when new components ship, each with its live demo and prompt.