-
I've consulted the documentation here: Essentially, I'd like the ability for users to toggle the theme outside of fumadocs (in other areas of my app). Is the https://github.com/pacocoursey/next-themes?tab=readme-ov-file#usetheme import { useTheme } from 'next-themes'
const ThemeChanger = () => {
const { theme, setTheme } = useTheme()
return (
<div>
The current theme is: {theme}
<button onClick={() => setTheme('light')}>Light Mode</button>
<button onClick={() => setTheme('dark')}>Dark Mode</button>
</div>
)
} |
Beta Was this translation helpful? Give feedback.
Answered by
fuma-nama
Aug 30, 2024
Replies: 1 comment 2 replies
-
You can use next themes on your side |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
nktnet1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use next themes on your side