Can I Create This Tricky Animated CSS Sidebar?

Поделиться
HTML-код
  • Опубликовано: 16 май 2024
  • Sidebars are an integral part of web development and can get pretty complicated. The RUclips sidebar is a perfect example of a complex yet elegant sidebar and in this video I will be attempting to create RUclips sidebar live for the first time.
    📚 Materials/References:
    GitHub Code: github.com/WebDevSimplified/y...
    🌎 Find Me Here:
    My Blog: blog.webdevsimplified.com
    My Courses: courses.webdevsimplified.com
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/WebDevSimplified
    CodePen: codepen.io/WebDevSimplified
    ⏱️ Timestamps:
    00:00 - Introduction
    00:30 - Setup
    01:34 - HTML
    03:55 - Header CSS
    09:44 - Sidebar CSS
    45:32 - Sidebar JavaScript
    46:50 - Sidebar Animation
    #CSSAnimation #WDS #CSS

Комментарии • 132

  • @SuboptimalEng
    @SuboptimalEng 2 года назад +150

    Kyle: Can I Code This Tricky Sidebar?
    Me: * checks video length *
    Me: Yea, probably.

  • @Smiley01987
    @Smiley01987 2 года назад +52

    Pro tip: you can slow down the animations in the Chrome devtools to really see in detail what kind of animations are being applied to the elements.

  • @avneet12284
    @avneet12284 2 года назад +147

    Excellent - I'd try to avoid width/height for transitions - that'll trigger repaints. Scale/Translate = better.

    • @lucianmehedinteanu
      @lucianmehedinteanu 2 года назад +5

      Yes, translate is way better. Performance is very good. Avoiding top, left, right, bottom and hwight width is recomandwd

    • @RodrigoMendoza7
      @RodrigoMendoza7 2 года назад +8

      I agree, but what would you do to prevent things from squeezing when using "scale"?

    • @elieanimations
      @elieanimations 2 года назад +6

      True. But another approach is to only optimise if the performance is bad because it will add complexity as well. Here there aren't many components and the animation seems fluid.

    • @avneet12284
      @avneet12284 2 года назад

      @@elieanimations you are right

    • @dealloc
      @dealloc 2 года назад +1

      @@elieanimations While I agree premature optimizations are bad. I think it would be important to explain and show why it's bad. For example, somebody taking the code from this video, without thinking about the ramifications when they have a lot of content in the body, might incorrectly assume this is the way to do it.

  • @joemoussally2927
    @joemoussally2927 2 года назад +7

    Thank you for your vids, I'm only a month new in HTML CSS and JS, and your vids helped me a LOT in understanding the concepts when applying it. Thank u so much!

  • @walterhafner2910
    @walterhafner2910 2 года назад +11

    Was great to see you figuring out solutions on the run. really learned a lot, great video

  • @mattunlu8916
    @mattunlu8916 2 года назад +15

    I liked more when you try something you have not done before . So we all see how to handle , fix or walk around errors, issues. Thanks

  • @ahmedroberts4883
    @ahmedroberts4883 2 года назад +5

    Love it. I am learning so much just watching how you work and think. I appreciate it.

  • @unnervingibet117
    @unnervingibet117 2 года назад +2

    I just got into computer science and am currently learning python, however, I stumbled upon this video and it was so interesting I couldn't believe how entertaining you and watching you code is. This video rocks, thanks!

  • @stark469
    @stark469 2 года назад +3

    Amazing.
    Found something really interesting in free time ☺️

  • @infraredgoldfish
    @infraredgoldfish 2 года назад +8

    3 minutes into the video and I'm blown away man. This is going to help so much with work. Thanks, this info is so valuable

  • @brijeshkanchan9776
    @brijeshkanchan9776 2 года назад +7

    I was searching for this since 1 year. None of them were perfect.
    Now its perfect.
    Thank You Sir.

  • @JDalmasca
    @JDalmasca 2 года назад +31

    For box-shadows, using multiple, layered shadows usually results in a more natural gradient, adding additional realism to the effect.

    • @TheDannytaz
      @TheDannytaz 2 года назад +1

      This! They can be a bit of a headache to understand at first but the result is simply stunning

    • @dienazty8820
      @dienazty8820 2 года назад +1

      Can you share an example please?

  • @spencer5051
    @spencer5051 2 года назад +5

    Absolutely love the new format. Thanks for keeping the errors and troubleshooting in.

  • @vojinmilovic5787
    @vojinmilovic5787 2 года назад +1

    You make me think I can actually get a job. Seeing you struggle there for a good hour really gave me confidence that other people need time as well.

  • @kleinesmaccify
    @kleinesmaccify 2 года назад

    Very clean explanations and excellent content/tempo ratio...thanks for sharing.

  • @DanielWegmann
    @DanielWegmann 2 года назад +8

    i like how you run into problems, struggle in inspecting your own code as if someone else has written it and then solve the issue. feel it!

    • @Aedaeum
      @Aedaeum 2 года назад +2

      Unfortunately that's CSS programming in a nut shell lol. I really hate the language, but no one realized at the time of its creation, that websites would become the new software applications...

    • @JeloOW
      @JeloOW 2 года назад +1

      @@Aedaeum just letting you know that css and html arent a programming language

    • @Aedaeum
      @Aedaeum 2 года назад +1

      @@JeloOW Actually a very hotly debated topic that is not settled one way or another. If you're a purist, you believe a programming language must be Turing complete, however I'm in the other camp. I believe if you are writing instructions that create a unique behavior through their interpretation, then you have successfully programmed something and I would call those instructions a programming language.

  • @W4IT-YT
    @W4IT-YT 2 года назад

    Its nice & amazing to see how you code all this

  • @BryndilleYT
    @BryndilleYT 2 года назад +3

    Well, as pointed already, I would use scale/translate for transitions. Also you forgot about the opened dashboard overlapping the content, and adding a dark filter to the main content.

  • @alouisjeanmedia7723
    @alouisjeanmedia7723 2 года назад +1

    You gained my "like" at the calc property. Good show sir, good show indeed!🧐

  • @rishabsharma5307
    @rishabsharma5307 2 года назад

    Need more videos like this

  • @mikoajwychorski4648
    @mikoajwychorski4648 2 года назад

    Love u, good work. U r very helpful thank u

  • @evanlarsen1980
    @evanlarsen1980 2 года назад

    I really like these videos! Please make more :)

  • @Muzly
    @Muzly 2 года назад +2

    30,000 subscribers in the last 28 days? Damn, you're killing it! Great job.

    • @WebDevSimplified
      @WebDevSimplified  2 года назад +5

      Thanks. This last month has been by far the best ever for my channel.

    • @quixote5986
      @quixote5986 2 года назад

      @@WebDevSimplified Rightfully so

  • @starwaveprime7398
    @starwaveprime7398 2 года назад

    Hi! I really enjoy your videos, thanks!

  • @hassaneoutouaya
    @hassaneoutouaya 2 года назад

    Thank you !

  • @D.P._
    @D.P._ 2 года назад +1

    Very powerful video, so much technics in just one example!

  • @UmairSadaqat
    @UmairSadaqat 2 года назад

    The one thing you need to work on and what is it your playlist please organize your playlist when someone looking for a beginner to advanced JavaScript course your playlist is mashed up we all love your content and your design so consider this bro Love from Pakistan 🚀

  • @abhilashmatukumalli4321
    @abhilashmatukumalli4321 2 года назад

    This is just awesome, can you also create this over react please

  • @librakala7457
    @librakala7457 2 года назад +2

    It would be awesome if you make a video doing a functional multilanguage system with just html and js

  • @tmnrp
    @tmnrp 2 года назад

    Awesome.... :) Thank you

  • @aliezadkhaha9439
    @aliezadkhaha9439 2 года назад

    Excellent

  • @user-jz4iz2qh9u
    @user-jz4iz2qh9u 2 года назад

    Excellent video and topic! Could you please make a video on LottieFiles and how to integrate them in a website? Perhaps a loading animation or something… thanks 🙏🏻

  • @jawherjawa555
    @jawherjawa555 2 года назад

    great job

  • @MuhammadAdnan2.0
    @MuhammadAdnan2.0 2 года назад

    Awesome 👍

  • @jackbushnell2622
    @jackbushnell2622 2 года назад +1

    Thank you so much Kyle! I have one question: how can I make the sidebar stay open when moving to a new page like content.html (for example)?

  • @joshhallan
    @joshhallan 2 года назад +2

    Is there a reason why you don't use SCSS? I find it easier when nesting for different components. Also have you thought about JS hooks opposed to data attributes?

  • @charliecayno
    @charliecayno 2 года назад

    One thing I noticed is the positioning of text on RUclips is not actually moving but just appearing when it's open. But overall, great CSS!

  • @nguyenthaibao7345
    @nguyenthaibao7345 2 года назад

    Nice!

  • @nizarkadri3109
    @nizarkadri3109 2 года назад

    I was waiting for customized scrollbar as youtube, seems like you kinda missed it. Otherwise great video!

  • @__Phederal__
    @__Phederal__ 2 года назад

    So good

  • @CodeAProgram
    @CodeAProgram 2 года назад +1

    Awesome

  • @user-oq1vz8hy4r
    @user-oq1vz8hy4r Год назад

    At the 6:00 point in the video, Kyle wraps the SVG element in a button, to "make it more accessible"... what exactly is meant by this?
    Can the SVG element itself not be made to have the similar functionality of a button that may be later required?
    I am not challenging or doubting this method/approach... I am just wondering what exactly is meant by "accessible" in this case.
    Thank you. Great content!

  • @andrija-official
    @andrija-official 2 года назад +1

    Great video, Kyle! Sometimes you sound like I'm watching at 1,25x speed

  • @mohammedezzinehaddady7252
    @mohammedezzinehaddady7252 2 года назад +1

    box-shadow for me especially with light background colors like white is something like 0 2px 3px rgba(0,0,0,0.2)

  • @giwrgosiwannidis4684
    @giwrgosiwannidis4684 2 года назад

    Hey Kyle! Could you please make a video or project about React Native ? It would help so much

  • @MattCurney
    @MattCurney 2 года назад

    The king showing us his channel dashboard.

  • @mdsaifulislamshanto4444
    @mdsaifulislamshanto4444 Год назад

    Great

  • @plemplem
    @plemplem 2 года назад +1

    I can't believe that you've spent an hour perfectly replicating the style and animation of that sidebar but you didn't spend the second it would've taken you to add "font-family: sans-serif" 💀

  • @paoloose
    @paoloose 2 года назад

    yes

  • @AvanaVana
    @AvanaVana 2 года назад

    This video is a classic example of the divide between what developers **think** looks the same, and what actually looks the same. 😂

  • @learn029
    @learn029 2 года назад

    can you please make a Custom Js framework like React JS from scratch

  • @Kokuen0245
    @Kokuen0245 2 года назад

    What VSC plugins are used here? Please and thanks.

  • @gururajmoger8649
    @gururajmoger8649 2 года назад

    If u add the scroll bar and change the font ll looks like same

  • @RyanMontambeault
    @RyanMontambeault 2 года назад

    anyone know why when I use a class for the li's, it wont change the color of the svg? Mine only seems to work if I put the fill in the a tags class.

  • @morningstarsci
    @morningstarsci Год назад

    why did you use * as well as *::after and *::before? doesn't * apply to those elements as well?

  • @hatersbudiman7058
    @hatersbudiman7058 2 года назад

    How to use swipe gestur in this sidebar?

  • @DesignwithCracka
    @DesignwithCracka 2 года назад

    Now I'm gonna try recreate this in Oxygen Builder :)

  • @S4LTYT
    @S4LTYT 2 года назад

    hey Kyle Please make a video on reducing bundle size of React app in production. please.

    • @SuperAlibajwa
      @SuperAlibajwa 2 года назад

      Try implementing lazy loading in ur react app

  • @BorosBlake
    @BorosBlake 2 года назад

    Its cool. Now, how to make it work, when you click on the sidebar link, render the content into the main area, without reloading the whole page? Do you use jquery, httprequest, or must to use a framework like react, vue ? Can you contiue this example with the rest of the functionality?

    • @robertcarsten4050
      @robertcarsten4050 2 года назад

      So you could theoretically have multiple sections in the "content" container. Set them to display:none.
      And then in JS set an "active" like class on the section corresponding to the clicked button.
      Not the best way, as I would probably just reach for a framework if that was the case

    • @d.sherman8563
      @d.sherman8563 2 года назад

      There are a million different ways to solve this.

    • @BorosBlake
      @BorosBlake 2 года назад

      @@d.sherman8563 I already know that. But would like to see than view solutions..

  • @RobbyDongre
    @RobbyDongre 2 года назад

    Can you create one project using mongodb, node js and javascript. It would be great if you create one ecommerce site

  • @developer_hadi
    @developer_hadi 2 года назад

    can you make videos of learning JavaScript from scratch to pro

  • @engmt8435
    @engmt8435 2 года назад +1

    Love you from algeria

  • @dvdmndz5946
    @dvdmndz5946 2 года назад

    ❤️❤️

  • @funnylifestyle8174
    @funnylifestyle8174 2 года назад

    Lets go...

  • @techtipsuk
    @techtipsuk 2 года назад

    Always keep your errors in so much better.

  • @burakkaya9149
    @burakkaya9149 2 года назад

    He is a good programmer.

    • @finsflexin
      @finsflexin 2 года назад

      Yeah, he is a good programmer

  • @smcalpha
    @smcalpha 2 года назад

    Can I use your sidebar as an inspiration for a react sidebar-component?

  • @Sven1222225
    @Sven1222225 2 года назад

    why did u use position sticky on sidebar? why not fixed. is there any difference?

  • @sahilkamra4586
    @sahilkamra4586 2 года назад

    Can anybody please share their journey about how you started creating websites without much help like without watching tutorials that takes you from A-Z? Like ofcourse while using resources like Google and stack overflow and using RUclips tutorials to understand basic topics but creating things on your own.

  • @AlexCouch65
    @AlexCouch65 Год назад

    You: *uses inspect element to get the svgs and colors and play around with the box shadow*
    Also you: *doesn't use inspect element to copy the box shadow to save time*
    I kid of course

  • @lordrampenthump422
    @lordrampenthump422 2 года назад

    well i just learned about lorem in vs code

  • @chefbennyj
    @chefbennyj 2 года назад +1

    Yeah debugging videos are great because people can see the process.

  • @dannylee5037
    @dannylee5037 2 года назад

    "And that's all it took to create RUclips sidebar..."
    It took literally 1 hour to replicate it.

  • @wallace4904
    @wallace4904 2 года назад +2

    El Niño?

  • @maxime9728
    @maxime9728 2 года назад

    778,822 SUBSCRIBERS BTW

  • @traju2737
    @traju2737 2 года назад

    First view from Hyderabad (India)

  • @avmalik3705
    @avmalik3705 2 года назад +4

    First view from india

  • @geb2
    @geb2 2 года назад

    Like the Bob Ross of the next generation...

  • @cubanolibre5465
    @cubanolibre5465 2 года назад

    A tutorial video made for people that dont need tutorials videos. Xd

  • @mykalimba
    @mykalimba 2 года назад

    Slick move editing the DOM to change the revenue number to "????". Or does RUclips make all content creators wonder what this number is? 🤔

  • @augustuscaeser8939
    @augustuscaeser8939 2 года назад

    any chance this video can be shorter?

  • @snow3570
    @snow3570 2 года назад

    I’m so triggered that you didn’t change the font.

  • @rezaroohian9549
    @rezaroohian9549 2 года назад

    If you had used Sass/Less or at least use some naming convention like BEM you could have achieved the same result in half the time.

  • @iydl
    @iydl 2 года назад +1

    CSS is easy but annoying for me to do idk why.

  • @khizrshaikh9902
    @khizrshaikh9902 2 года назад

    First

  • @aungthiha0
    @aungthiha0 2 года назад

    Please share css of your hair.

    • @madhumitamiddya702
      @madhumitamiddya702 6 месяцев назад

      .hair{
      display:flex;
      justify-content: space-evenly;
      align-items: center;
      background: linear-gradient(45deg, brown, wheat);
      transform: skewY(2.5deg);
      }

    • @madhumitamiddya702
      @madhumitamiddya702 6 месяцев назад

      npm i --save @kyle-hair

  • @afin4684
    @afin4684 2 года назад +1

    Best theme for Vscode?

  • @tj_1260
    @tj_1260 2 года назад

    Namerlp

  • @johnkucharsky6927
    @johnkucharsky6927 2 года назад

    CSS is difficult

  • @muzammilsyed2339
    @muzammilsyed2339 2 года назад

    Close the damn sidebar of vscode jeez

  • @alex01at
    @alex01at 2 года назад +2

    Beautiful, but not responsive. :-)

    • @starwaveprime7398
      @starwaveprime7398 2 года назад

      I'm new to web dev and I wanted to ask what about JS for this? but I think this sum up the answer 😃

    • @alex01at
      @alex01at 2 года назад

      @@starwaveprime7398 The JS part only trigger the button and add css-class to sidebar. It's the easiest way for it.

    • @robertcarsten4050
      @robertcarsten4050 2 года назад

      @@alex01at
      Actually all of this could be recreated with just html +Css really simply without Javascript.
      Wouldn't make a tonne of sense since this is theoretically the sidebar for a SPA but still easy and possible