Skip to content

Scroll snap events #1345

Description

@dsenneff

Description

The CSS Scroll Snap events, “scrollsnapchange” and “scrollsnapchanging”, give developers precise control over advanced interfaces through quick and easy access to information about scroll snap interactions on the page.

Developers can currently use a combination of IntersectionObserver and scroll events to create a loose approximation. But that is inefficient for both the developer experience and browser’s performance, with the information not guaranteed to be accurate.

Scroll Snap Events make the task trivial while being tied to the browser’s own scroll snap mechanisms. Which is more accurate and performant.

Chromium is currently the only browser engine to support Scroll Snap Events. The Chrome team published this blog post introducing the feature:
https://developer.chrome.com/blog/scroll-snap-events

Specification

https://www.w3.org/TR/css-scroll-snap-2/#snap-events

web-feature

https://web-platform-dx.github.io/web-features-explorer/features/scroll-snap-events/

Test Links

No response

Additional Signals

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions