--- url: /migration-guides/1.0-2.0.md --- # v1.x → v2.x You will find on this page documentation on all the breaking changes included in the v2.x of the package. \[\[toc]] ## ScrollAnimation components have been refactored The `ScrollAnimation` family of components has been refactored for better performance and flexibility. The new API uses `ScrollAnimationTimeline` as a parent component that manages scroll progress, with `ScrollAnimationTarget` children that handle individual animations. ### Summary of component renames | v1.x (deprecated) | v2.x (new) | | ------------------------------ | --------------------------------------------------- | | `ScrollAnimation` | `ScrollAnimationTimeline` + `ScrollAnimationTarget` | | `ScrollAnimationParent` | `ScrollAnimationTimeline` | | `ScrollAnimationChild` | `ScrollAnimationTarget` | | `ScrollAnimationChildWithEase` | `ScrollAnimationTarget` with `dampFactor` option | | `ScrollAnimationWithEase` | `ScrollAnimationTimeline` + `ScrollAnimationTarget` | | `animationScrollWithEase` | Extend `ScrollAnimationTarget` instead | ### Benefits of the new API The refactored API provides several benefits: 1. **Better performance**: The timeline only watches one element for scroll position, reducing the number of intersection observers 2. **Independent damping**: Each target can have its own `dampFactor`, allowing different animation speeds within the same timeline 3. **Simpler markup**: No need for a `target` ref — the component animates itself 4. **Clearer naming**: `Timeline` and `Target` clearly describe the parent-child relationship 5. **More flexible**: Easier to coordinate multiple animations with different play ranges ### Replace `ScrollAnimation` with `ScrollAnimationTimeline` and `ScrollAnimationTarget` The standalone `ScrollAnimation` component has been removed. Use `ScrollAnimationTimeline` with `ScrollAnimationTarget` children instead. **Before (v1.x):** ```html