
Implementing Dark mode in Next JS with Tailwind.
10 October, 2022
10
10
1
Contributors
Prequisites
•
•
Getting Started
💡 Note - Via the command above, you install Tailwind CSS and the dependencies PostCSS and autoprefixer.
tailwind.config.js
file and your postcss.config.js
file. Open the postcss.config.js
file and include all the plugins you want to use.💡 Note - I have gone and added tailwindcss and autoprefixer.
tailwind.config.js
file, add the following changes.💡 Note - Add .light
and .dark
CSS classes and assign the colors for each variables.
npm run dev
.pages/index.js
to see if Tailwind CSS is working.
css
javascript
hacktoberfest
nextjs
tailwindcss
webdev