Scroll Animation

A Framer Motion reveal-on-scroll component for React. Animate any content—text, images, videos—with directional (left, right, up, down) and fade-in transitions triggered on entering the viewport.

Installation

npx uilayouts@latest add scroll-animation

Props

PropTypeDefaultDescription
childrenReact.ReactNodeThe content to be rendered within the scroll element.
classNamestringOptional CSS class for styling the scroll element.
variantsobjectAnimation variants for different scroll states (hidden/visible).
viewportobject{ amount: 0.5, margin: '0px', once: true }Settings for when the element is considered in view.
delaynumber0Delay before the animation starts, in milliseconds.
directionDirection'down'The scroll direction for the animation (e.g., 'down', 'up').

Example

Repeat Animation

Text Animation