CSS Tip! 📜 You can use scroll-driven animations to progressively enhance collapsing a floating call…
@jh3yy148K followers
178,031 views
10 Comments
Comments from the original post on X (Twitter)

@jh3yy
Here's that @CodePen link! 🚀 Scroll-driven animations are supported in Chromium browsers ⚡️ Your users should get a decent experience in all! 😎 No JavaScript? it'll run if supported and won't if not 🤙 JavaScript and it's not supported? GSAP 😉
28 likes

@bedesqui
the sheer amount of cool stuff you can do with scroll animations 🤯
6 likes

@hannahsox12
This looks cool, but if I were the user it would annoy me so much. As a dev, I'd want to add in something so once the user clicks on it once, it goes away.
3 likes

@jh3yy
Totally agree! 💯 Implemented this one to see how it would work. Inspo is taken from Android apps such as the Gmail client. In that app, the "Compose" button does this behavior. Shrinks and grows on scroll.
4 likes

@zacharystoltz
Can this be used for things “scrolled into view” natively? Or would you still need JS with the web api…. Which for the life of me can’t remember?
3 likes

@emlez_
Would love Intercom or more chatbots did this!
2 likes

@dabi_simon
@setemiojo Love this CSS tip! Scroll-driven animations can really elevate a web design!
2 likes

@Tylopilus
For scroll driven animations can we also use it for relative values? I always see absolut numbers but sometimes I don’t know when the comp is in viewport
2 likes

@jh3yy
Yes totally! 💯 The API for that is view() Check this demo out 👇 The heading is animated based on its position within the viewport using the range keywords entry and cover. The animation-timeline is set to view()
3 likes

@JvShah124
That's cool 🤩
1 like