Reveal

Scroll-triggered entrance animation driven by IntersectionObserver, with a RevealGroup for staggered cascades. Content stays visible without JS and under reduced motion.

Installation

npx dafink-ui add reveal

Demo

Scroll-triggered entrance
Staggered by 120ms
With its own effect

Composition

<RevealGroup>
<Reveal />
</RevealGroup>

Props

NameTypeDefaultDescription
effect"fade" | "slide-up" | "slide-left" | "slide-right" | "scale""fade"Entrance effect applied when the element scrolls into view.
delaynumber0Delay in milliseconds before the entrance transition starts.
oncebooleantrueReveal only on first entry. When false, content re-hides on exit and re-reveals on re-entry.
stagger (RevealGroup)number100Milliseconds added to each successive child Reveal’s delay.
delay (RevealGroup)number0Base delay applied to the first child of the group.
classNamestring""Additional Tailwind classes merged onto the wrapper element.