ZeroGravity UI

Scrollstable

Eclipse

Covering sections

Each section pins, and the next one slides over it until nothing is left.

01

One

02

Two

03

Three

04

Four

scrolls inside this frame

Scaled to the frame so the whole takeover is visible here. On a page each section is a full viewport.

Customize

Covereach section pins, then the next one slides over it
from
0.060recede
0.45dim
0 pxblur

Usage

TSX
import { Eclipse } from "zerogravity/eclipse"

<Eclipse>
    <EclipseSection>One</EclipseSection>
</Eclipse>

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

Props

9 documented props on Eclipse
PropertyTypeDefaultDescription
from"up" | "left" | "right""up"Arrives from.
recedenumber0.06Recede. Range 0 to 0.2.
dimnumber0.45Dim. Range 0 to 1.
blurnumber0Blur. Range 0 to 12 px.
childrenReactNode—One `EclipseSection` per panel. Order is the cover order.
heightstring"100vh"How long each section stays pinned.
scrollContainerRefObject<HTMLElement>—Drive it from a scrollable element instead of the page.
disabledbooleanfalseDrops the pinning entirely: sections simply follow one another.
onActiveChange(index: number) => void—Called when the section in view changes, not on every frame.

Dependencies

0 external runtime dependencies

Ships with nothing but React.