Create a Dark Mode Switch with HTML, CSS, JavaScript

Поділитися
Вставка
  • Опубліковано 18 жов 2024
  • Learn how to create a dark mode switch with html and css and save the theme with javascript localstorage. This html, css and javascript beginner tutorial with explain how to provide a dark and light mode switch on your website.
    *Check out our website*:
    👉 www.coding2go.com
    Get our HTML Udemy Course*:
    👉 www.udemy.com/...
    *Host your own website with Hostinger*:
    👉 www.hostinger....
    Use our code CODING2GO to get a 10% discount
    *What You'll Learn*:
    CSS Darkmode: Using CSS custom-properties or css variables you can create a dark mode for your website
    CSS Dark Mode switch: Learn how to create a dark mode switch with HTML, CSS and JavaScript
    Change Dark Mode Icon: Learn how to switch image inside the dark mode light mode button with moon icon and sun icon
    Save Darkmode in the browser using JavaScript and LocalStorage
    Key Points:
    CSS Dark Mode
    CSS Light Mode
    JavaScript darkmode switch
    HTML CSS JavaScript dark mode button
    moon icon, sun icon
    Switch image on click
    change icon on click
    save theme in the browser
    store in localstorage
    save dark mode for next website visit
    remember theme
    remember dark mode
    recall theme css javascript
    Practical Examples:
    Create a dark mode option for your website with html, css and javascript localstorage
    Topics:
    HTML, CSS, JavaScript, Dark Mode, Darkmode, darkmode, css tutorial for beginners, css dark mode tutorial for beginners, javascript dark mode, dark theme, darkmode theme, light mode , light theme, dark vs. light mode, dark and light mode switch, dark and light mode button, light more button, dark mode button, change themes, change to dark mode, change dark theme, css variables, css custom properties, javascript localstorage, change theme on click, dark mode click button, moon button, moon icon, sun icon, change moon and sun icon dark mode, learn css dark mode, css js dark mode tutorial for beginners, javascript, js, remember dark mode, save dark mode, save theme, save light theme, save dark theme, store darkmode, store theme in the browser
    Credits
    Track: "Little Things"
    Music provided by Slip.stream
    Free Download/Stream: get.slip.strea...
    Track: "Scared Of The Glizzy"
    Music provided by Slip.stream
    Free Download/Stream: get.slip.strea...
    Track: "Take Off", NEFFEX
    Music provided by Slip.stream
    Free Download/Stream: get.slip.strea...
    Listen on Spotify: go-stream.link...
    Background Animation:
    Decoration Stock Videos by Vecteezy: www.vecteezy.c...
    Like & Subscribe for more 😉
    Check out our website: www.coding2go.com

КОМЕНТАРІ • 59

  • @coding2go
    @coding2go  2 місяці тому +2

    The source code is now available on our website: coding2go.com

  • @edwardmintah4476
    @edwardmintah4476 2 місяці тому +11

    The best thing I like about your tutorial is the fact that you have a voice over which makes it more comprehensive not just some mouse moving on the screen

    • @Iamdyzzy
      @Iamdyzzy Місяць тому +1

      Chaley make we link up. I need someone discuss with sometimes

  • @letmewatch.
    @letmewatch. 2 місяці тому +8

    This is the newest channel I'm addicted to. Love how you explain very clearly!

    • @coding2go
      @coding2go  2 місяці тому +4

      Nice to hear that!

  • @KoushikMrunal
    @KoushikMrunal 2 місяці тому +20

    Bro content is just...🗿🔥

  • @matousjirovec
    @matousjirovec 2 місяці тому +9

    You create the best coding tutorials on youtube

  • @bulolo_wilber
    @bulolo_wilber 7 днів тому

    What a coincidence, I literally just tried it out today and YT recommends a video about darkMode lol

  • @sanjaux
    @sanjaux 2 місяці тому +3

    Great tip on the localStorage, didn’t know about that and was thinking i’d need to do something more complicated to achieve that.

  • @w3bpiyush_
    @w3bpiyush_ 2 місяці тому +2

    Please start javascript your way of explaining is just 🔥👌

  • @crookinsane6808
    @crookinsane6808 2 місяці тому

    i often dont write comments but this video litrealy forced me to do so, your content is so awesome brother. instead of writing complicated js code you keep things simple where you can . absolutely loved this, Thanks

    • @coding2go
      @coding2go  2 місяці тому +1

      Thank you! Your kind words are very appreciated 💙

  • @user-sk9kl9bn1r
    @user-sk9kl9bn1r 2 місяці тому +1

    You always creating the best and hight quality coding tutorials :)

  • @georgejere2306
    @georgejere2306 2 місяці тому

    Everyday i wait for your posts, the gradient button i added in my classwork and it was just wow :)

  • @abdisamadkhalif4283
    @abdisamadkhalif4283 Місяць тому +2

    Have you thought about using HSL for your colors ? It might give you more flexibility with shades and tones and some industry experts recommend it? By the way, great video, man!

  • @RoliBeatzz
    @RoliBeatzz 2 місяці тому

    Now this is how you make tutorials, Great job, awesome !❤

  • @ferret0156
    @ferret0156 23 дні тому

    Bro this content is amazing!

  • @potachibtw3144
    @potachibtw3144 5 днів тому

    bro ur the goat thank u so much

  • @justforfun3634
    @justforfun3634 2 місяці тому

    Clear and concise

  • @serious_17
    @serious_17 2 місяці тому +1

    you have inspired me so much, I have subscribed you and will learn from your every video.

    • @coding2go
      @coding2go  2 місяці тому

      Awesome! Thank you 💙

  • @MrAlexanderFriedrichder13te
    @MrAlexanderFriedrichder13te 2 місяці тому

    Very helpful and simple video ❤

  • @muhammad_zohaib936
    @muhammad_zohaib936 2 місяці тому

    Great work appreciated sir! 🌟

  • @ShahriarCode
    @ShahriarCode 2 місяці тому

    Man make more like thiss 🔥💥
    I loved your Js addEventListner tutorial video that was a masterpiece
    You should make more js tutorial vidoes like that short and informative

  • @relaxingbuddygaming8867
    @relaxingbuddygaming8867 2 місяці тому

    Love from india 🇮🇳❤

  • @thundercanee
    @thundercanee 5 днів тому

    Yo are you using normal vscode theme, or a different one (in that case can you tell me?) ?

  • @asharikalam
    @asharikalam Місяць тому

    Videodaki uygulamanın mantığı çok giriş seviye olmuş. Bu tür tema etkileşimlerinde server-side çalışmak uygulama optimizasyonu ve kullanıcı arayüzü açısından daha sağlıklı. Çünkü CTRL + F5 yaparsanız, sayfayı ilk olarak beyaz göreceksiniz. Bunun Client-Side olarak çözümü yoktur ve kötü bir deneyim bırakır. Yine de emeğiniz için teşekkürler, tasarım videosu bekliyoruz.

  • @edutechab
    @edutechab 2 місяці тому

    How come you don't have 1 million subscribers?

  • @SahilPatil-y8h
    @SahilPatil-y8h 2 місяці тому

    vro ur tricks and logic behind coding is simply great thanks for sharing and this video also very informative and great keep growing and uploading these type of videos can u start uploding react videos also btw love ur videos and channel'

  • @abdulloh1071
    @abdulloh1071 2 місяці тому

    My brother thanks you for video💪🏻

  • @gloriamasengo
    @gloriamasengo 2 місяці тому

    can you do that for images?

  • @oubaidharbi
    @oubaidharbi 2 місяці тому

    thank you for this video see you next video

  • @mhuzaifa6040
    @mhuzaifa6040 2 місяці тому

    Bro kindly make video on css grid

  • @bskviper
    @bskviper 2 місяці тому

    Need Grid Concept Video. When will you upload

  • @SarwarUmrzakoff-y6v
    @SarwarUmrzakoff-y6v 2 місяці тому

    broo u are genious

  • @bhanuprakashreddy0601
    @bhanuprakashreddy0601 2 місяці тому

    Can you create a water mark template with html and css for email template and normal template? I'm waiting for these video?

  • @saeentist-hb
    @saeentist-hb 2 місяці тому

    nice, what about html checkbox:checked toggle buttons?

    • @coding2go
      @coding2go  2 місяці тому

      Using checkboxes can be a great CSS only solution to get a darkmode working but if you want to store the theme in the local storage you need JavaScript.

  • @Jamy_6b
    @Jamy_6b 2 місяці тому

    Awesome👍❤️

  • @mustasinbillah-u7d
    @mustasinbillah-u7d 2 місяці тому

    thank you for this video

  • @robertodepasamonte3434
    @robertodepasamonte3434 2 місяці тому

    Excellent and very well presented tutorial on coding dark mode capability. Thank you for sharing. Could you please put the source code on codepen or provide a download link.

    • @coding2go
      @coding2go  2 місяці тому

      Thank you for your kind words! I have now put the source code on our website coding2go.com to download✌

    • @robertodepasamonte3434
      @robertodepasamonte3434 2 місяці тому

      @@coding2go Thank you.

  • @moonskined
    @moonskined 2 місяці тому

    That's so coool!

  • @chetankalania4709
    @chetankalania4709 2 місяці тому

    bro suggest me a site from where i can download good color palette..........and also tell me from where do u take your color palette

    • @coding2go
      @coding2go  2 місяці тому

      I come up with my own color palettes in Adobe when building the prototype. But there are also websites like coolors.co or colorhunt.co that provide good color palettes. Use realtimecolors.com to test your color palette on a demo website in real-time.

  • @JonnakutiKiranBabuBVCE
    @JonnakutiKiranBabuBVCE Місяць тому

    super

  • @dailynews7822
    @dailynews7822 2 місяці тому

    Nice

  • @techwake360
    @techwake360 2 місяці тому

    Awesome

  • @svs1674
    @svs1674 2 місяці тому

    If (you === comfortable){
    Please make a separate video on how you edit your videos and thumbnail if you're comfortable with it
    }
    else{
    Out of syllabus
    }

  • @SamuelDesaleng
    @SamuelDesaleng Місяць тому

    Bro is😎☀️🤓

  • @Runkang10
    @Runkang10 2 місяці тому

    I jumped to React and Next.js without learn basic JavaScript like eventlistener but I learn Advanced TypeScript. 😅

    • @coding2go
      @coding2go  2 місяці тому +1

      Yeah I get that. Learning advanced frameworks can get so exciting that you skip a few steps along the way. But its always good to build a strong foundation by learning the basics thouroughly. That way understanding the advanced concepts will be much easier.

  • @iqranizamani
    @iqranizamani 4 дні тому

    how to join your channel?

    • @coding2go
      @coding2go  4 дні тому

      You can use this link to join our channel.
      ua-cam.com/channels/GpoeEhUBQBaaKZ_a8HB67Q.htmljoin

  • @abdulloh1071
    @abdulloh1071 2 місяці тому

    My brother thanks you for video💪🏻