Tailwind CSS Dark Mode | React App Theme Switcher
HTML-код
- Опубликовано: 29 сен 2024
- In this short video, I'll show you how to use Tailwind CSS Dark Mode to improve the look and feel of your React app. We'll also discuss how to use Tailwind's Theme Switcher to change the theme of your app with just a few clicks!
Tailwind is a powerful CSS framework that includes Dark Mode support. This video will show you how to use Tailwind's Dark Mode to improve the look and feel of your React app. We'll also discuss how to use Tailwind's Theme Switcher to change the theme of your app with just a few clicks!
-----------------------------------------------------------------------------------------------------
This video will also explain to you how you can set it up to check for the browser's default preferred scheme and apply the color according to the settings.
💻 GitHub for this project - github.com/Azm...
-----------------------------------------------------------------------------------------------------
Music Credits :
Song: Fredji - Happy Life (Vlog No Copyright Music)
Music provided by Vlog No Copyright Music.
Video Link: • Fredji - Happy Life (V...
but there is problem , when i switched dark mode from light and later on if do refresh it will go back to light mode again , how can resolve this problem
Did you find solution I think storing theme dark or light on localstorage fix this 😊
but there is problem , when i switched dark mode from light and later on if do refresh it will go back to light mode again , how can resolve this problem
use setLocalStroage() to store the preivous theme value in browser local storage.
Save current theme in localStorage
This doesnt work for me and the code is not doing anything
if even if I went step by step it doesn't work
Awesome guide, after searching around this is the best one I found. Simple and efective!
When refresh the page the darkmode will be gone. Not a great video for the production.
just store it in local storage
Thanks. You are great☺
Good,
But its too hard to apply the dark theme on each element in the app,
Its should be more reusable way to do that ..
This button will actually trigger all the dark elements with className: “dark:” you have to within the site.
I think the other approach would be to add it app/index.css file and use @apply if you want it all over the site.
background music is irritating
how can I add a transition to the theme switch
Can you guys tell me one thing I have an image in my head.js folder and I have a particular Darkmode component that has a theme state and thus what i want is that in my head.js folder I want to change my logo to a white one whenever my theme state changes to dark
This has been easy to follow and made integration easier, unless I didn’t read the docs correctly to get it to work, the example you provided with hooks definitely helped.
Good Video
Valuable content like this will help us both to grow.
Most simplified video you'll find on RUclips on 'Dark mode in Tailwind, react'
Its's a very easy and effective way to toggle dark/light theme with an exceptional explanation. 🎉😊
That was super easy and straightforward. Thank you!
it's best one i hope. And also need use toggle icon in this dark mode. please help me
Thanks buddy😊, your tutorial came through when i needed it
hi man, thank you it short, simple, and most importantly, works!
Thanks for the guide.
This was exactly what I needed! Thank you for this video! 😊
Thank you sooo much.. so short and simple
thank you thank you thank you for this
it works! thanks a bunch!!!
Thank you so much
damn this was helpful. thanks!
Awesome tutorial +++++++++++++++++ 🙂
Clear Explaination , Thank You :)
Thank you very much!
great video! thank you!
nice explaination , easy to understand , thanks
thanks mate
Most concise and good tutorial about dark mode.
Beautiful
Will it toggle the class in all the components ??
Yes, entire website.
Awesome
How to i get this type of terminal that you use?
I'm using an app called Hyper JS from - hyper.is/ and there are many tutorials on how you could set it up with the color and fonts the way you want.
Thanks a lot for helping me out!
I’m glad that it helped!
what ide is that?
VSCode with Material Theme!