Recreating Vercel's Smooth Navigation Animation With CSS Only

Поділитися
Вставка
  • Опубліковано 20 гру 2023
  • This week I noticed Vercel added a new scroll animation to their deployments page. My mind immediately thought this was such a nice animation that I wanted to recreate with Framer Motion. Then I thought; Why Framer Motion?! This is such a simple animation, we can do this with plain CSS!
    That is exactly what we will be exploring in todays video. We are gonna recreate this smooth scroll animation with just a few lines of CSS and a single JavaScript scroll listener. Let's dive in!
    Make sure to check out the live playground and code via the link below too!
    ✨ Become a PRO today via www.frontend.fyi/pro
    🔗 Code, live playground: www.frontend.fyi/v/recreating...
    #frontend #css #html #animations
  • Наука та технологія

КОМЕНТАРІ • 33

  • @migueldf10
    @migueldf10 7 місяців тому +16

    Vercel's UI animations are always a delight. Awesome pick and great video! Thank you!

  • @TheSteelzeh
    @TheSteelzeh 7 місяців тому +4

    Really good video! No fluff, just straight to the point. Was enjoyable to watch

    • @frontendfyi
      @frontendfyi  7 місяців тому

      Thank you so much, appreciate it!

  • @szymon7932
    @szymon7932 7 місяців тому +12

    cool, but how is that plain CSS? You even installed a lib to do that

    • @frontendfyi
      @frontendfyi  7 місяців тому +1

      Sorry for the confusion, I meant without any animation library but just with css 😁 (and indeed a scroll listener in js - which with css scroll driven animations can be even done without, but that’s not fully cross browser compatible yet!)

    • @swolebastard531
      @swolebastard531 7 місяців тому +1

      I agree this was a little clickbaity haha. Would like to see you recreate this with only CSS, even though it's not fully cross browser compatible.

    • @frontendfyi
      @frontendfyi  7 місяців тому

      @@swolebastard531Well the only thing that has to change is the scroll driving animations. Take a look at this video/article, it's a fairly similar approach: www.frontend.fyi/v/css-scroll-driven-animations
      Would love to see how you do it ;)

    • @joshuastories
      @joshuastories 7 місяців тому

      Tailwind is just shorthand css. Utility classes map almost 1 to 1 with CSS. I don’t think it was clickbait. If you know CSS, you know tailwind

    • @swolebastard531
      @swolebastard531 7 місяців тому

      @@frontendfyi Nice, will look into it!

  • @elgeneee
    @elgeneee 7 місяців тому +2

    so clean! cant believe i didnt notice this on their dashboard 🙄

  • @mycode0
    @mycode0 7 місяців тому

    That is a world class content, thank you !

  • @didemkucukkaraaslan7373
    @didemkucukkaraaslan7373 7 місяців тому

    Thanks for this vid!

  • @xsls0n
    @xsls0n 7 місяців тому

    Cool video as always & happy holidays Jeroen 🎉

    • @frontendfyi
      @frontendfyi  7 місяців тому +1

      Thank you! Happy holidays to you too 😁

  • @iPankBMW
    @iPankBMW 7 місяців тому

    Finally some1 showed me how to create picel based animation based on scroll - this gives us native mobile app feeling :)

  • @maratiot
    @maratiot 7 місяців тому

    nice and neat css and js

  • @hiyankey
    @hiyankey 7 місяців тому +2

    Happy new year Jeroen

    • @frontendfyi
      @frontendfyi  7 місяців тому +1

      Thank you Emmanuel! Wishing you the best for the coming year too!

  • @mckaymower
    @mckaymower 7 місяців тому +1

    how can you do this with framer motion? :) can you have another tutorial with framer?

    • @frontendfyi
      @frontendfyi  7 місяців тому +3

      You can, but if there’s no reason to make it with framer I always opt for css only. It’s simpler, quicker, more performant.

  • @gauravmali6250
    @gauravmali6250 6 місяців тому

    I love to buy your course but when it is coming ?

    • @frontendfyi
      @frontendfyi  6 місяців тому

      The first modules will release in a few weeks! I'm working on the final lessons and details. As soon as that happens the price will also increase shortly after (but I will send out an email to the newsletter before that happens). Hoping to meet you in Discord!

  • @nested9301
    @nested9301 7 місяців тому

    the problem with software development is not how had to do it , u will do it and it will work, but is it the right approch ?

    • @frontendfyi
      @frontendfyi  7 місяців тому +1

      Contrary to lots of hype channels I try to teach it in a way it’s done in the real world. This is the way you can use it in production 🫡
      Besides that; there’s no single solution to anything it all depends and multiple solutions can be right. Thanks for mentioning it though!

  • @mbaochachigozie1785
    @mbaochachigozie1785 4 місяці тому

    Great tuts, but this is still framer motion without using framer motion 😅

  • @gioelem5957
    @gioelem5957 7 місяців тому

    Framermotion has the same hook, it's called useScroll. It's the same, isn't it ?

    • @frontendfyi
      @frontendfyi  6 місяців тому +2

      Yes, 100% the same! You can use that one as well.

  • @ArnabAnimeshDas
    @ArnabAnimeshDas 7 місяців тому

    It's not CSS only though.

  • @mleite1
    @mleite1 7 місяців тому

    CSS only? 😂

  • @boredhuman23
    @boredhuman23 7 місяців тому

    not css only solution i guess.

    • @frontendfyi
      @frontendfyi  7 місяців тому +1

      At least no JavaScript animation library I meant. Sorry for that 🫡