Reveal
Reveal any component on scroll: rise, fade in, 3D unfold. Pro · 3D and motion › Motion for any component
Brings any component into view as it scrolls in — a card rises, a heading fades, a picture grows — with the theme's distance, tempo and spring. Only opacity and the individual translate / scale properties move, on a Web Animation, so the child keeps its own transform, hover and focus styles and React never renders for the motion. Nothing is hidden on the server or with reduced motion; keyboard focus and printing show the content at once.
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add reveal
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { Reveal } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
asChild | boolean | false | Animates the only child (a Card, a Button, a section) instead of wrapping it in a div: no extra element. |
preset | 'fade' | 'up' | 'down' | 'start' | 'end' | 'scale' | 'pop' | 'flip' | How the element enters: up rises, fade only fades, scale / pop grow, start / end slide in, flip swings up in 3D. | |
distance | number | Travel, px. Default: the theme's --ui-motion-distance. | |
duration | number | Length, ms. Default: the theme's --ui-motion-enter. | |
delay | number | Wait before entering, ms. | |
spring | SpringName | The spring the move follows. Default: the theme's --ui-motion-spring (pop bounces). | |
once | boolean | Enter once (default) or each time the element scrolls back into view. | |
amount | number | Visible share that starts the entrance, 0–1. | |
margin | string | Grows or shrinks the viewport that counts, like a CSS margin. | |
disabled | boolean | Off: the element is simply shown. | |
fade | boolean | Fade in while moving (default). false: only the move plays and the element keeps its full opacity, so its text is at its final contrast from the first frame (a figure that must stay readable, a scale emphasis). The fade preset then has nothing left to play. |
Related components
- Stagger — Lists, grids and table rows appear in a wave, one after another
- Tilt — Tilt, lift, glare and magnetic pull under the cursor for any card
- Layout Group — Jump-free reordering: filter, sort, regrid
- Presence — Enter and exit: an element stays mounted until its exit animation ends
- Scene Backdrop — WebGL or CSS scene behind a regular UI: hero, cards, dashboard
- Scroll Cylinder — Headline lines on a rotating cylinder, driven by scroll
- Stacking Panels — Panels stick on scroll and pile into a stack
- Helix Rail — Cards on a helix that spins with scroll
- Scroll Scene — Scroll scene: a pinned screen changes step by step, with a progress rail
- Parallax Layers — Depth layers that shift with scroll and cursor
- Orbit Showcase — 3D ring of cards: drag with momentum, arrows, keyboard
- Coverflow Carousel — 3D product carousel on native scroll: swipe with momentum, arrows, keyboard
Previous: Confetti · Next: Stagger · All 3D and motion