Toggle Sidebar B
AppearanceLight & dark mode D

Animated Content

Wrapper that animates any children on scroll or mount with configurable direction, distance, duration, easing and disappear options.

Default

Every prop is wired to the controls underneath. The animation plays once when the element reaches the trigger line, use the replay button to run it again.

Dark previewReplay previewOpen in new tab
Animate Me

Customize

Direction
Ease
Disappear Ease
Distance100
Duration0.8
Delay0
Initial Opacity0
Initial Scale1
Threshold0.1
Disappear After0
Disappear Duration0.5

API Reference

AnimatedContent

PropTypeDefaultDescription
containerstring | HTMLElementnullThe scroll container to use for ScrollTrigger. Can be a selector string or an element. Falls back to the element with id snap-main-container, then the window.
distancenumber100Distance (in pixels) the component moves during animation.
directionstring"vertical"Animation direction. Can be "vertical" or "horizontal".
reversebooleanfalseWhether the animation moves in the reverse direction.
durationnumber0.8Duration of the animation in seconds.
easestring"power3.out"GSAP easing function for the animation.
initialOpacitynumber0Initial opacity before animation begins.
animateOpacitybooleantrueWhether to animate opacity during transition.
scalenumber1Initial scale of the component.
thresholdnumber0.1Intersection threshold to trigger animation (0-1).
delaynumber0Delay before animation starts (in seconds).
disappearAfternumber0Time in seconds after which the content will disappear. Disabled if set to 0.
disappearDurationnumber0.5Duration of the disappearance animation in seconds.
disappearEasestring"power3.in"GSAP easing function for the disappearance animation.
EventDescription
completeEmitted when the entrance animation completes.
disappearance-completeEmitted when the disappearance animation completes.
SlotDescription
defaultThe content to be animated.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • The wrapper is hidden until its animation starts, so content inside is not exposed to assistive tech before it enters.