Skip to main content

Reveals

Animates its children into view as they enter the viewport, staggering each one by cascade for a sequential reveal. Accepts either children or an items array.

import { Reveals } from '@jbpark/ui-kit';

<Reveals effect="fadeInUp" cascade={0.15}>
<div>First</div>
<div>Second</div>
<div>Third</div>
</Reveals>;

First

Revealed on scroll.

Second

Revealed on scroll.

Third

Revealed on scroll.

Props

PropTypeDefault
effect'fadeIn' | 'fadeInUp' | 'slideInUp''fadeInUp'
cascadenumber (stagger between items, seconds)0.1
durationnumber (seconds)0.6
delaynumber (seconds, before the first item)0
onceboolean (animate only the first time)-
itemsItemProps[][]
classNames{ root?: string; item?: string }-
classNamestring-
childrenReactNode-

viewport, variants, and transition are forwarded to the underlying motion element for fine-grained control. Reveals.Item is also exported for composing a single animated item directly.