pacocoursey / next-themes

Perfect Next.js dark mode in 2 lines of code. Support System preference and any other theme with no flashing
https://next-themes-example.vercel.app/
MIT License
5.18k stars 190 forks source link

[Feature request]: Support themes with themes #309

Open tammyhart opened 2 months ago

tammyhart commented 2 months ago

What feature would you like to see?

For my current project, I'm considering offering visitors multiple "styles" that would then also have both dark and light "themes".

Such as:

From there, I would have a way to select which "style" you want, and a separate button for switching between dark and light "themes".

The reasoning is that this is for my portfolio and offering different "styles" would be a way to let them switch design trends applied to the content, while a separate dark/light switcher would feel more "system tool"-ish, for the lack of a real word.

I would also want to continue to support the system theme setting.

Perhaps this is already possible and I just haven't thought hard enough about how to implement it, but I wanted to get the request out there anyways.

tammyhart commented 2 months ago

I also occurs to me I might consider this structure:

const themes = { dark: ["style1", "style2"], light: ["style1", "style2"], }

Need to think harder on this, but wanted to jot this thought down before I lose it.

universse commented 2 months ago

It looks like this project is no longer maintained so perhaps you can take a look at my library which supports this use case.