🚀Ship faster with UI-Layouts Pro

Work With Us

Scroll Element

A Framer Motion animation component that allows for directional animations, including movement from left, right, or bottom.

Installation

npx uilayouts@latest add scroll-element

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