Tailwind has first-class support for dark mode and a powerful theme customization system. This lesson covers the dark: variant, extending the default theme, and creating a custom design system.
Tailwind has first-class support for dark mode and a powerful theme customization system. This lesson covers the dark: variant, extending the default theme, and creating a custom design system.
Dark Mode and Custom Themes is one of the most important topics in Tailwind CSS. This lesson builds the foundation you need before moving to more advanced concepts — take time with each example and run the code yourself.
export default { darkMode: 'class', // 'media' uses OS preference, 'class' uses a CSS class // ...
} Before moving on, make sure you can answer these without looking: