ZeroGravity UI

Motionstable

Aperture

A full-bleed panel that closes into a framed card as you scroll, or opens.

clip-path, not width

The frame opens

scrolls inside this frame

Scaled down to fit the frame, and set to open so the panel starts as a card and grows to full bleed. On a page the pane is the viewport and it reads page scroll.

Customize

Framehow far the edges come in
300cqhheight
17.00 %inset
26 pxradius
direction
Motioncontent and shading
0.080scale
0.000dim
dimColor
easing
disabled

Usage

TSX
import { Aperture } from "zerogravity"

<Aperture>
    <div>Panel content</div>
</Aperture>

Generated from the controls above. Only props that differ from their defaults are shown.

Props

11 documented props on Aperture
PropertyTypeDefaultDescription
heightstring"300cqh"Scroll length. Range 150 to 500 cqh.
insetnumber17Inset. Range 0 to 40 %.
radiusnumber26Corner radius. Range 0 to 80 px.
direction"close" | "open" | "both""open"Direction.
scalenumber0.08Content pull-back. Range 0 to 0.3.
dimnumber0Dim overlay. Range 0 to 1.
dimColorstring"#05050a"Dim colour.
easing"smooth" | "linear""smooth"Easing.
disabledbooleanfalseDisable motion.
childrenReactNode—The panel content. It never rescales — only the window changes.
onProgress(progress: number) => void—Scroll progress from 0 to 1.

Dependencies

0 external runtime dependencies

Ships with nothing but React.