Customize theme values
Use Just-In-Time compiler
Use values outside theme
Implement dark theme
Configures and implements dark mode variant
Enable dark mode
// tailwind.config.js module.exports = { darkMode: 'class', // or 'media' // ... }
Dark mode usage
<div class="bg-white dark:bg-gray-800"> <h1 class="text-gray-900 dark:text-white">Dark mode</h1> </div>
Create default config file
Install Tailwind CSS
Compile Tailwind CSS