Roche Limit

ProShowcase & MediaInteractivityWebGLpowered by @vectorvesper/motion

A video card pulled apart by the pointer. While the video plays, the card breaks away from its bottom edge grain by grain, and each grain keeps the film's colour as it falls into the pointer. When the last one is in, the card re-forms and starts again.

Roche Limit

Included with membership

Members install Roche Limit 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 hero, a case study or a launch page with one film worth a closer look. The grains add light, so it suits a dark page. Anything you put inside it, such as a heading, sits under the falling grains.

  • Use a seamless loop. The film keeps playing while the card comes apart.
  • Give the area a height and leave room below the card. When the pointer is away, the grains fall to a point under the card.
  • Describe the film in label. Screen readers read the card as a picture with that description.
  • Size and place the card with cardClassName. By default it is 80% of the area's width, up to 720 pixels, at 3 by 2.

Avoid:

  • Do not put it on a light page. The grains add light, so they hardly show on white.
  • Do not change duration, travel, grain or radius on a card that is already built. They are read when the scene is built, so give it a new key to change them.
  • Do not put two on one page. Each draws a scene the size of its area.

Props

A video card pulled apart by the pointer. While the video plays, the card breaks away from its bottom edge, grain by grain. Each grain keeps the colour of the film where it broke and falls into the pointer, which acts as a black hole: the grain brightens and draws out into a streak as it nears it. When the last grain is in, the card re-forms in the order it broke and starts again.

<RocheLimit />

The area the grains fly in, with the card inside it. The area is a grid that centres the card and anything you put inside it, and is at least 420 pixels tall.

PropTypeDefaultDescription
src*string—The video on the card. It plays muted and loops.
posterstring—A still of the video, shown while it loads and in the reduced-motion player.
labelstring"video"What the video shows, for screen readers.
durationnumber16Seconds the card takes to crumble from its bottom edge to its top.
travelnumber3.6Seconds a grain takes to fall into the pointer.
grainnumber3The size of a grain, in CSS pixels.
radiusnumber14The card's corner radius, in CSS pixels.
classNamestring—Sizes the area the grains fly in. The card sits inside it.
styleReact.CSSProperties—Style for the area the grains fly in.
cardClassNamestring—Sizes and places the card within that area.
cardStyleReact.CSSProperties—Style for the card.
childrenReact.ReactNode—Anything else in the same area, such as a heading. The grains fly over it.
Visitors who prefer reduced motion get a plain video player with its own controls in place of the card. Devices below the runtime's floor get the same.
It runs on the shared frame loop, at up to one and a half times the screen's pixel density, and the runtime lowers the resolution when frames run long. The film pauses while the card is off screen.
The card and every grain keep the film's own colours. duration, travel, grain and radius are read when the scene is built.
Client component. The server renders the area, anything inside it and the card with its poster, and the scene is built in the browser.
Back to all components