How to build an Animated Slider with Framer Motion

Ойын-сауық

Learn how to use Framer Motion to make a reactive, animated slider.
🪄 Framer Motion course: samselikoff.com/framer-motion...
💻 Slider demo: codesandbox.io/s/github/samse...
🧑‍💻 Diff from this video: github.com/samselikoff/framer...
💬 Apple Music Twitter thread: / 1520129733760929792
🎧 Apple Music demo: ios-apple-music-clone.vercel.app
🧑‍💻 Apple Music source code: github.com/samselikoff/ios-ap...

Пікірлер: 32

  • @abe10
    @abe102 жыл бұрын

    That progress bar color trick using linear gradient was pretty sweet ✨

  • @simonswiss
    @simonswiss2 жыл бұрын

    That vinyl scratch zoom out to editing Sam transition was mint af!

  • @tonybrown7847
    @tonybrown78472 жыл бұрын

    I love the way you explain things. It’s easy to grasp concepts with the way you teach.

  • @danielolavioferreira599
    @danielolavioferreira5992 жыл бұрын

    Amazing Sam, congrats on the video!!

  • @zlatkoiliev8927
    @zlatkoiliev8927 Жыл бұрын

    The moment you said "I was thinking to add another div and style it so it shows the progress, but there is even more elegant way of doing it..." and then immediately snapped in my brain and I even said it out loud "LINEAR GRADIENT!!!". Funny because I was with my headphones and my wife was sitting in the same room and she was shocked whats going on... :))))

  • @williamx0
    @williamx0 Жыл бұрын

    Man your videos are amazing! Thanks for teaching us! I had an Apple-like moment of "wow" in the middle of the video because the code is so clean and concise and you explain it so straightforward and it just works. So much elegance in the cleanliness of this that I definitely appreciate that many people may not. Oh yeah, it was the background linear gradient part where I was like.. ouuu yeah that's cool! lol

  • @1235niki
    @1235niki2 жыл бұрын

    Very cool, thanks for sharing Sam.

  • @erwin7427
    @erwin74272 жыл бұрын

    Great video! Haven't used Framer Motion but it's about time to start learning.

  • @carlosraul6578
    @carlosraul65782 жыл бұрын

    really love your videos, thanks

  • @MatiasLeidemer
    @MatiasLeidemer2 жыл бұрын

    Amazing content. Thanks for sharing!

  • @pigeonnnn
    @pigeonnnn Жыл бұрын

    This is awesome. I'm gonna try and and do a version with steps as well

  • @chrisrisner637
    @chrisrisner637 Жыл бұрын

    Great video!

  • @unmy400
    @unmy4002 жыл бұрын

    crazy good content as always

  • @dimitardimitrov3421
    @dimitardimitrov34212 жыл бұрын

    I think I’ve said it before, but I’ll say it again - This channel is criminally underrated!

  • @nonefvnfvnjnjnjevjenjvonej3384

    @nonefvnfvnjnjnjevjenjvonej3384

    2 жыл бұрын

    All channels are until they are not

  • @masked_mediator
    @masked_mediator Жыл бұрын

    perfect, couldn't have been explained better!

  • @MykhailoAndrosiuk
    @MykhailoAndrosiuk8 ай бұрын

    awesome 😍

  • @uwepuneet
    @uwepuneet2 жыл бұрын

    awesome framer motion slider 🍻

  • @tjcurran6041
    @tjcurran6041 Жыл бұрын

    Framer Motion God

  • @basmulders6070
    @basmulders60702 жыл бұрын

    Thanks for this great content, really useful! Having followed along, I only noticed some minor issues with the slider on a mobile device. When you're not careful on there, the page scroll on a longer page tends to take over and the slider drag stops. There seem to be some open issues on the framer-motion repo regarding this. Yet, it's still very usable. Keep this type of content coming, can't wait for the next video!

  • @samselikoff

    @samselikoff

    2 жыл бұрын

    Great point, I should circle back and make it really polished on mobile! I didn't even consider that for this demo!

  • @timothymeade-on-twitter

    @timothymeade-on-twitter

    2 жыл бұрын

    Please do. Mobile is so important.

  • @Chavez3d
    @Chavez3d2 жыл бұрын

    You are so thorough I wish you would teach your learning process... I always seem to know just enough... do you have tips for mastering things? it takes so long to learn by reading and experimenting for me..

  • @MrREALball
    @MrREALball Жыл бұрын

    There is a bug in this code: when you calculate the new value you do "newProgress * (max - min)", but it is not right. Consider this: min = 1, max = 100, than the actual range would be 0 - 99. What you need to do instead is this: newProgress * (max - min) + min

  • @dimitardimitrov3421
    @dimitardimitrov34212 жыл бұрын

    I have a general question. If you use this slider as a way to switch pages on a webpage (think iBooks on iOS, where you can drag the slider to move back and forward in a book). How would you go about snapping to a page? For example, you're at page 7, you slide just slightly and if the user has not dragged enough to reach page 8 - snap the drag handle back to page 7. I feel like this should be pretty simple and I've been staring at this problem for a long time now...

  • @GuitarCaendu
    @GuitarCaendu9 ай бұрын

    Maybe a stupid question. But how can I now embedd this in my framer website?

  • @wintphyopaing
    @wintphyopaing Жыл бұрын

    Can I please know vscode theme used in this video?

  • @roid1510
    @roid1510 Жыл бұрын

    How would you add steps to this slider? 👀

  • @ottrr_
    @ottrr_ Жыл бұрын

    Love the tutorial--helped me a ton! I found a trick in the Framer Motion docs for making the slider move to where you click and then be draggable in the same tap: www.framer.com/docs/gestures/###dragcontrols

  • @prasathsoosaithasan1281

    @prasathsoosaithasan1281

    Жыл бұрын

    Thanks for the pointer!

Келесі