Рет қаралды 13,627
Animated UI components for React, Tailwind CSS, Framer Motion & More ✨ www.hover.dev
Theming your website, wether just to allow light and dark mode, or even to allow full customization of the look and feel for your users, is a great (and often expected) way to increase user experience.
Today we'll take a look at how we can achieve this in TailwindCSS utilizing CSS variables. We'll use ReactJS for our example, but everything will apply exactly the same for HTML, CSS & JS, Svelte, Vue, or any other framework.
📚 Project Links
Source: github.com/TomIsLoading/tailw...
🔗 My Links
TikTok: / tomisloading
Instagram: / tomisloading
GitHub: github.com/TomIsLoading
Twitter: / tomisloading
Discord & more: linktr.ee/tomisloading
Portfolio templates: tomisloading.gumroad.com/
Website: www.hover.dev
0:00 - Intro to theming in TailwindCSS
0:36 - Defining colors in your tailwind config
0:56 - Using CSS variables
1:41 - Refactor our example
2:05 - Adding more themes
2:44 - Switching themes based on OS preferences & more