Theme Toggle
A button that toggles between light and dark themes.
Installation
Add the theme toggle component with the shadcn CLI.
npx shadcn@latest add https://yami.ui.unsanity.ai/r/theme-toggle.jsonUsage
import { ThemeToggle } from "@/components/ui/theme-toggle"
<ThemeToggle />Examples
Outline
Pass any Button variantCode
import { ThemeToggle } from "@/components/ui/theme-toggle"
<ThemeToggle variant="outline" />