{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "mode-toggle", "type": "registry:example", "author": "shadcn (https://ui.shadcn.com)", "files": [ { "path": "examples/mode-toggle.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Moon, Sun } from \"lucide-react\"\nimport { useTheme } from \"next-themes\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"@/registry/default/ui/dropdown-menu\"\n\nexport default function ModeToggle() {\n const { setTheme } = useTheme()\n\n return (\n \n \n \n \n \n setTheme(\"light\")}>\n Light\n \n setTheme(\"dark\")}>\n Dark\n \n setTheme(\"system\")}>\n System\n \n \n \n )\n}\n", "type": "registry:example", "target": "" } ] }