Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

curved scrollbar: completed it ✅ CSS + SVG to animate stroke-dashoffset combined with scroll-snap

229,909 Aufrufe • vor 1 Jahr •via X (Twitter)

12 Kommentare

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

p.s completed it last year 💀 but yesterday's gave it a little polish and some extra configuration options plus, a new trick where you animate the scroll-snap value which works surprisingly well

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

p.p.s the curved scrollbar concept isn't a new one first time seeing it was this great piece from @RoberaGeleta 👏

Profilbild von Anima
Animavor 2 Jahren

📢It is live! @figma design to @MUI_hq or @AntDesignUI "Whether your design is well organized or a bit chaotic, using standard components or none, Anima takes it all and translates it into high-quality #MUI or #AntDesign code."-->

Profilbild von dru
druvor 1 Jahr

Man, I love the twitter community. Looks awesome!

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

inspired me to give it a "glow up" ✨🙏

Profilbild von Aleks
Aleksvor 1 Jahr

insane 🔥

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

whether we can find a practical use case or not for it is another matter 💀

Profilbild von Sab
Sabvor 1 Jahr

Would you please what is this tool you are using!? (The window which has title: config)

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

tweakpane v4.0.4

Profilbild von Shahriar Shafin 𝕏
Shahriar Shafin 𝕏vor 1 Jahr

Awesome 🌟. is it open source?

Profilbild von Jett
Jettvor 1 Jahr

haven’t seen you on my TL for a min. Still the goat 🐐

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

trying to stay present – working on things in the background 👀

Ähnliche Videos

Future CSS Tip! 🍏 You can create this Apple-style photo scroller by combining CSS scroll-driven animations and CSS scroll-snap 😍 Peep those changing captions 👀 No JS! img { animation: highlight both linear; animation-timeline: view(inline); 👈 Horizontal animation-range: cover 0% cover 50%; 👈 Finish } @ keyframes highlight { 50% { translate: 0 0; scale: var(--starting-scale); 👈 props opacity: var(--starting-opacity); 👈 } 100% { translate: 0 0; scale: 1; opacity: 1; } } Without the animation support, you get a standard unordered list containing some s 🤙 How do we swap the captions though? The "trick" is to use position: absolute on the figcaption and animate their opacity based on the ViewTimeline of their parent list item 😎 figcaption { animation: show both linear; animation-timeline: --list-item; } @ keyframes show { 0%, 45%, 55%, 100% { opacity: 0; } 50% { opacity: 1; } } li { view-timeline-name: --list-item; view-timeline-axis: inline; 👈 important! } The parent of the scroll track uses position: relative so all the captions sit in the middle even though they are in the right place for the markup 🙌 The last bit is the scroll-snap 🤙 Not much to it at all. Wrap the list and make it scrollable. Then add scroll-snap-type .wrapper { scroll-snap-type: x mandatory; overflow-x: scroll; } Then make sure each list item has scroll-snap-align set on it li { scroll-snap-align: center; } That's it! Pretty cool demo to put together and see how to do this stuff with these APIs 🤓 A lot of cool little tricks to pick up for writing your CSS! ⭐️ CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

234,583 Aufrufe • vor 3 Jahren