Reveal
Atom
An entrance for page content: what it wraps starts slightly offset and transparent, then travels into place and fades in when it reaches the viewport. It fires once and stays, so content that has arrived never leaves again.
Playground
Every control sets a real prop of RevealProps. The JSX below updates as you go.
Web
iOS
Android
JSX · RevealProps
Variants
8 examples from src/atoms/reveal/reveal.md, each rendered live from its own JSX.
Anatomy
1
Entering block
Dimmed parts appear only in some states or variants.
Props
10 props on RevealProps, grouped as they are declared in source. Required props are marked *.
Accessibility and keyboard
Keyboard
Not focusable. It has no interaction of its own and takes the semantics of what it wraps.
Semantics
No role of its own in source; it reads as the content it renders.
From the docs
The trigger is measured against the window rather than the nearest scrolling parent, so content sitting inside a short inner scroller can arrive before that scroller has been scrolled to it; reveal on the page scroll, which is what this is for. Under Reduce Motion the content renders its final frame immediately, with no measuring and no timers, and the stagger is skipped along with the motion.
Platform skins
The playground's props on each platform: same tree, native shapes, type and touch sizes.
Usage
Direction chooses the axis it travels from, with fromBelow the default and fromAbove, fromLeft, fromRight the alternatives (that is also the precedence order if more than one is passed). pronounced travels further, brisk arrives faster, and deepInView holds the entrance until the element is properly inside the viewport instead of firing as it enters.
Stagger is structural rather than numeric: wrap a set in RevealGroup and each child arrives after the one before it, so no call site ever computes a delay. RevealGroup renders no box of its own, so it can sit between a grid and the items the grid lays out.
The trigger is measured against the window rather than the nearest scrolling parent, so content sitting inside a short inner scroller can arrive before that scroller has been scrolled to it; reveal on the page scroll, which is what this is for. Under Reduce Motion the content renders its final frame immediately, with no measuring and no timers, and the stagger is skipped along with the motion.
Tokens
Read from the playground render. Values follow the scheme and the ion hue.
--fd
--ft
--ln
--sf2
--sh-md