@muriel.schmidt
To create multiple themes using Tailwind CSS, you can follow these steps:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
module.exports = {
theme: {
colors: {
light: {
background: '#ffffff',
text: '#000000',
primary: '#3498db',
},
dark: {
background: '#1a202c',
text: '#e2e8f0',
primary: '#2b6cb0',
},
},
},
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
.light-bg {
background-color: #ffffff;
}
.dark-bg {
background-color: #1a202c;
}
.light-text {
color: #000000;
}
.dark-text {
color: #e2e8f0;
}
.light-primary {
color: #3498db;
}
.dark-primary {
color: #2b6cb0;
}
|
1 2 3 |
<div class="dark-bg dark-text"> <h1 class="dark-primary">Dark Theme</h1> </div> |
By following these steps, you can easily create and switch between multiple themes in your Tailwind CSS project.