Warp Field
A cloth under the page that bends like spacetime, in dark satin, holographic foil or off-white linen. Elements given a mass press wells into it, and everything marked to ride sinks into the dips, tilts with the slope and rocks as ripples pass. Hover to make something heavier, or hold to set two masses spiralling in until they merge.
Included with membership
Members install Warp Field 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 landing screen where the page itself should feel physical: a collection, a launch, a portfolio. It is as big as the page you put in it, so give that page a height, usually the screen's. Use one a page.
- Give a mass to the few things that matter, the product or the photos, and let the headings and links ride. Weights from 0.4 to 1.2 read well, and data-mass with no number weighs 1.
- Give the one thing you want watched the most weight. The heaviest mass beats slowly, sending out a ripple, so the page is never quite still.
- Mark whole blocks to ride, a heading or a paragraph, not each word. An element inside another that rides moves with its parent.
- Match the text to the cloth. Satin and foil are dark, so light text reads on them. Linen is off-white, so give the page dark text.
Avoid:
- Do not mark more than 12 masses or 20 riding elements. Any after them stay put, which reads as a mistake.
- Do not put data-mass or data-ride on an element with a transform of its own, a hover lift say. The cloth moves them with an inline transform, which replaces yours. Put the attribute on a wrapper instead.
- Do not put two on one page. Each draws a scene the size of its box.
Props
A cloth under your page that bends like spacetime: dark satin, holographic foil or off-white linen. Elements you give a mass press wells into it, and the rest of the page rides it: headings and links sink into the dips, tilt with the slope under them and rock as ripples pass. Hover something heavy and it sinks further. Hold the pointer down and two masses circle each other, faster and closer, until you let go and they merge in one ripple.
<WarpField />
The cloth, and the page drawn on it. It is the size of what you put in it, and the cloth fills it.
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | The page drawn on the fabric. Any element inside it with a `data-mass` attribute presses a well into the fabric; the number is its weight. Hovering it makes it heavier. The heaviest one beats slowly, sending out a ripple. Every element with `data-mass` or `data-ride` rests on the fabric and moves with it: it sinks into dips, tilts with the slope under it and rocks as a ripple passes. One inside another moves with its parent. The first 12 masses and the first 20 riding elements count; any after them stay put. |
strength | number | 1 | How deep the wells look. |
fabric | "satin" | "foil" | "linen" | "satin" | What the page is made of: dark satin, holographic foil or off-white linen. It can change while the fabric moves. |
className | string | — | Class for the outer element, which the fabric fills. |