Your site has a dark mode. Then a client asks, "Can we also have a blue theme? And a green one? Oh, and red!" 😅
Suddenly you are staring at dark:bg-gray-900 blue:bg-blue-900 green:bg-green-900 red:bg-red-900 on every element. That is a lot of repeated classes.
There is a cleaner way. You define every theme's colors once in your global CSS. To switch themes, you change one class on the <html> element. No page refresh, no HTML changes, no per-element theme classes.
Ready to see how it works? 🚀
What Is a Multi-Theme System in Next.js?
A multi-theme system lets users switch between more than two color schemes, such as light, dark, blue, green, and red. The switch happens instantly, with no reload.
Think of a TV remote . The TV (your HTML) stays exactly the same.…