Skip navigation
#CSS scroll-driven animation + scroll snap events synchronized with a number input
0:00 / 0:25

#CSS scroll-driven animation + scroll snap events synchronized with a number input

Adam Argyle

@argyleink59K followers

Visit on X
1,079 likesDownloadOriginal post

62,168 views #CSS

#CSS scroll-driven animation + scroll snap events synchronized with a number input scrollSnapChange is lazy: used to update the blue highlight feedback UX scrollSnapChanging is eager: used to immediately update the number input value to match the snapped item set to ship in Chrome 129 snap events available to try today in Canary behind the web experiments flag try it blog post in the works that'll give all the details and tons more demo's 🤘🏻

10 Comments

Comments from the original post on X (Twitter)

  • Adam Argyle's profile picture

    @argyleink

    it's really nice to be able to trigger transitions from scroll snap so easily, make interrupting them no big deal

    4 likes

  • Adam Argyle's profile picture

    @argyleink

    another teaser video: this one progressively enhances the interaction to add the staggering only if the user is cool with motion and has snap events in their browser

    94 likes

  • Adam Argyle's profile picture

    @argyleink

    Demo test on Android, in Canary with web experiments enabled

    2 likes

  • GD Steve's profile picture

    @GDSteve6

    That's so cool 🔥

    1 like

  • Ahmad Shadeed's profile picture

    @shadeed9

    Wow 😍

    1 like

  • 7hw3dm4p0's profile picture

    @7hw3dm4p014623

    I LITERALLY WANTED TO BUILD SOMETHING LIKE I COUDLN'T LAST YEAR SO I SETTLED FOR THIS ON MY BLOB OMG

    1 like

  • Ivan B's profile picture

    @zu1in

    Looks cool 😎. On a semi-related note: what software did your use to record the video with those mouse cursors? I've been looking for something like that but haven't found anything yet :/

  • Adam Argyle's profile picture

    @argyleink

    I used Kap and emulated touch via devtools 🤘

    3 likes

  • 🍥kvndy's profile picture

    @KvnDy

    I hope this works for an inline child element on container resize. Resizing a container to become narrower causes an inline child element to move below the bottom of the viewport as container scrollHeight increases, which I want to prevent.

  • dgr^esm's profile picture

    @digger_c64

    @blog2t Check it out!