Scroll Reveal
A wrapper that animates its content in on scroll: seven effects (rise, fade, blur, scale, clip, slide-left/right), optional child staggering, any scroll container, and a no-motion fallback.
Try it: Scroll the frame — each block enters with its effect.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/scroll-reveal.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/scroll-reveal. You can also copy the source into components/ui/scroll-reveal.tsx (view on GitHub).
Usage
import { ScrollReveal } from '@/components/ui/scroll-reveal'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
effect | 'rise' | 'fade' | 'blur' | 'scale' | 'clip' | 'slide-left' | 'slide-right' | 'rise' | Entrance style. |
stagger | number | 0 | Seconds between direct children (0 = animate as one). |
delay / distance / amount | number | 0 / 40 / 0.25 | Delay, travel in px, visible fraction. |
once | boolean | true | Only animate the first time. |
scrollContainer | React.RefObject<HTMLElement | null> | window | Scroll element when the component lives inside its own scroller. |
as | 'div' | 'section' | 'article' | 'header' | 'footer' | 'div' | Rendered element. |
className | string | — | Extra classes merged onto the root. |
Dependencies
motion
Related Portfolio components
- Studio Folio Template
A complete one-page designer portfolio composed from Framekit parts — intro preloader, kinetic name hero, spy-nav, impact stats, filterable work with lightbox, services, testimonials, contact form…
- Services Cards
Four offers in one row: hover or focus a card and it swells while the others yield; a cursor-lit border follows the pointer, the icon tile tilts and deliverables stagger in with ticking checks.
- Dev Folio Template
A developer-flavoured one-pager composed from Framekit parts — terminal hero, skills marquee, hover-preview project index, scroll-drawn career timeline, skill meters, social dock, copy-email +…
- Résumé Download Button
The document glyph prints itself line by line, then drops into a tray as the file downloads and the label settles on “Saved”. Live status for screen readers.
- Year Activity Grid
A contribution calendar that blooms in on a diagonal wave, lights a crosshair of the hovered weekday and week, floats a readout above the day and reports streaks. Fully arrow-key navigable.
- Reading Progress + TOC
A spring-smoothed reading bar and a sticky table of contents that lights the section on screen, with a live “min left” estimate — made for long-form blog posts.