I'm building a React / Redux app combined with some styling libraries. By looking at the documentation of both Mantine and TailwindCSS, I found pages treating about how to make darkmode / lightmode work in the app for each of them.
As I understand, Tailwind will use a class that we have to append and remove from the <html>
tag of the webpage. While Mantine asks us to wrap our application inside the MantineProvider
with the colorScheme
property defined.
But... does that mean that my darkmode / lightmode switchers will have to change both of this values (the <html>
class, and the colorScheme
property) ? Is there a better way to handle this ?