Effects & Media /
newReveal
Animate children into view as they scroll into the viewport, via IntersectionObserver (useInView).
Examples
Staggered list
Scroll the preview — each card slides up + fades, staggered by delay. Scroll back up to replay (once={false}).
↓ scroll ↓
Item 1
Item 2
Item 3
Item 4
Item 5
Directions
Six entrance styles. Scroll within the box — they animate out and back in.
↓ scroll ↓
slide-up
slide-down
slide-left
slide-right
scale-in
blur-in
Enter + exit combo
Enter from below, leave upward (pass-through). Set exit to compose any in/out pair.
↓ scroll ↓
In ↑ from below · out ↑ to top
In ↑ from below · out ↑ to top
In ↑ from below · out ↑ to top
In → from left · out ← to left
⚠️ Don't wrap glass
Reveal animates opacity + transform on its wrapper, which makes it a backdrop root and kills the frost of any .naraya-glass descendant. Reveal a glass-free element, or reveal the content inside the glass surface instead.
Props
useInView
The underlying hook is exported from @naraya-ai/hooks: const [ref, inView] = useInView(). SSR-safe; falls back to visible when IntersectionObserver is unavailable.
Accessibility
- Content is rendered in the DOM regardless of visibility (good for SEO + screen readers).
- Under prefers-reduced-motion the entrance is skipped and content shows immediately.