UNPKG

next-theme-toggle

Version:

A CLI tool that instantly sets up dark/light theme toggling in your Next.js projects + Tailwind CSS v4 with zero configuration hassle.

23 lines (21 loc) 519 B
import "./globals.css"; import { ThemeProvider } from "next-themes"; export const metadata = { title: "Create Next App", description: "Generated by create next app", }; export default function RootLayout({ children }) { return ( <html lang="en"> <body className={` antialiased`}> <ThemeProvider attribute="data-theme" defaultTheme="system" enableSystem > {children} </ThemeProvider> </body> </html> ); }