---
url: /reference/items/ScrollAnimation.md
---
# ScrollAnimation
The `ScrollAnimation` component creates scroll-driven animations that respond to the viewport position, for effects such as parallax and fade-ins.
## Usage
For the best performance and flexibility, use `ScrollAnimationTimeline` with `ScrollAnimationTarget` children:
```js
import { registerComponent } from '@studiometa/js-toolkit';
import { ScrollAnimationTimeline, ScrollAnimationTarget } from '@studiometa/ui';
registerComponent(ScrollAnimationTimeline);
registerComponent(ScrollAnimationTarget);
```
```html
First element
Second element
```
## Deprecated components
:::warning Deprecated
The standalone `ScrollAnimation` component and the `ScrollAnimationParent`, `ScrollAnimationChild`, `ScrollAnimationChildWithEase`, `ScrollAnimationWithEase`, and `animationScrollWithEase` classes are deprecated in favor of `ScrollAnimationTimeline` and `ScrollAnimationTarget`.
See the [v1 → v2 migration guide](/migration-guides/1.0-2.0/) for the full mapping and before/after examples.
:::