Reveal
1 class reveals a whole page, on load and on scroll.
Landing
2 modes, default and subtle, for a page read once: each section arrives as the reader reaches it, so the page tells its story in order. Add reveal-landing or reveal-landing-subtle to its container.
- Class
- .reveal-landing
- Spring
- spring.slow
- Rise
- 12px
- Scale
- 0.94
- Step
- 0.1s
- Scroll
- 12–120px
Product
2 modes, default and subtle, for the app people come back to: the screen settles in once and nothing moves on scroll, so the 10th visit stays as calm as the first. Add reveal-product or reveal-product-subtle to its main column.
- Class
- .reveal-product
- Spring
- spring.moderate
- Rise
- None
- Scale
- None
- Step
- 0.06s
- Scroll
- None
Slow data shows a skeleton in the loading fill, bg-hover. Wrap it and the real block in reveal-swap, and add reveal-items to both for rows one by one.
Set it up
- Put everything on screen at first paint in the hero, product shot included.
- Keep the header, sidebar, and footer outside the container.
- In a grid, add reveal-scroll to each card, and again inside it so its content follows, like the Showcase.
- Use overflow: clip around anything that reveals on scroll.
Built in
- Landing steps ride spring.slow, product steps ride spring.moderate, and scroll steps follow the scroll. The presets work with CSS alone.
- Cards already on screen at load play right after the hero.
- Browsers without scroll timelines show every section in place.
- Reduced motion keeps the fades and stops the rise, scale, scroll motion, and pulse.
Reference
Presets
| Class | Description |
|---|---|
| .reveal-landing | The hero plays on load. Sections rise and leave on scroll. 12px rise, 0.94 scale, 0.1s steps on spring.slow, from 12px to 120px of scroll. |
| .reveal-landing-subtle | 8px rise, 0.98 scale, 0.06s steps on spring.slow, from 8px to 60px of scroll. |
| .reveal-product | Blocks fade in on load, 0.06s apart on spring.moderate. Nothing moves on scroll. |
| .reveal-product-subtle | 0.04s steps. |
| .reveal-scroll | Reveals a deeper section. Its parent section stays still. Nested reveals follow half a range later. |
Loading
| Class | Description |
|---|---|
| .reveal-swap | Stacks a skeleton and its real block. When the data lands, one crossfades into the other. |
| .reveal-items | Children arrive one by one, with at most eight steps. Works inside a preset or beside it. |