Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

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

229,909 görüntüleme • 1 yıl önce •via X (Twitter)

12 Yorum

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈1 yıl önce

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

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈1 yıl önce

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

Anima profil fotoğrafı
Anima2 yıl önce

📢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."-->

dru profil fotoğrafı
dru1 yıl önce

Man, I love the twitter community. Looks awesome!

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈1 yıl önce

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

Aleks profil fotoğrafı
Aleks1 yıl önce

insane 🔥

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈1 yıl önce

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

Sab profil fotoğrafı
Sab1 yıl önce

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

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈1 yıl önce

tweakpane v4.0.4

Shahriar Shafin 𝕏 profil fotoğrafı
Shahriar Shafin 𝕏1 yıl önce

Awesome 🌟. is it open source?

Jett profil fotoğrafı
Jett1 yıl önce

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

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈1 yıl önce

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

Benzer Videolar

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 görüntüleme • 3 yıl önce