Intent to Prototype: Scroll Triggered Animations

285 views
Skip to first unread message

David Awogbemila

unread,
Feb 6, 2025, 12:52:17 PMFeb 6
to blink-dev

Contact emails

awogb...@chromium.org

Explainer

https://github.com/explainers-by-googlers/scroll-triggered-animations

Specification

https://drafts.csswg.org/web-animations-2/#triggers

Summary

This feature adds scroll-position-based control on playing, pausing, resuming and canceling an animation. A common pattern on pages across the web is to kick off an animation when a scroll position is reached. Developers often do this by using JavaScript to manually detect that an element is within its scroll container's viewport and play an animation (e.g. perhaps to slide that element into view). Many of such use cases are based on information that can be provided declaratively. This feature gives authors the ability to set up such animations declaratively, using CSS. The API will also include JavaScript interfaces to maintain parity between controlling animations with JavaScript and controlling animations with CSS.



Blink component

Blink>CSS

Motivation

Kicking off animations after having reached a desired scroll position is a common pattern on the web. Achieving this requires JavaScript to know when to trigger an animation. However all the information needed for many use cases can be declaratively specified. This feature provides authors a convenient way to set up such animations in response to scrolling.



Initial public proposal

https://github.com/w3c/csswg-drafts/issues/8942

TAG review

None

TAG review status

Pending

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

No

Flag name on about://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5181996801982464?gate=5131602205868032

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages