Next.js
Adding dark mode to your next app.
Install next-themes
Start by installing next-themes:
Create a theme provider
components/theme-provider.tsx
Wrap your root layout
Add the ThemeProvider to your root layout and add the suppressHydrationWarning prop to the html tag.
app/layout.tsx
Add a mode toggle
Place a mode toggle on your site to toggle between light and dark mode.
Component mode-toggle not found in registry.