Theme Toggle
---import { ThemeToggle } from "@/components/ui/theme-toggle"---
<ThemeToggle />Installation
Section titled “Installation”To install the Theme Toggle component, run the following command:
npx shadcn@latest add @fulldev/theme-toggleThe Theme Toggle requires the Theme Provider to be placed in your document’s <head> to prevent flash of unstyled content (FOUC) and persist theme preferences.
Add the provider to your layout’s head section:
---import { ThemeProvider } from "@/components/ui/theme-toggle"---
<html> <head> <ThemeProvider /> <!-- other head elements --> </head> <body> <!-- your content --> </body></html>import { ThemeToggle } from "@/components/ui/theme-toggle"<ThemeToggle />