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.json

Usage

import { ThemeToggle } from "@/components/ui/theme-toggle"

<ThemeToggle />

Examples

Outline

Pass any Button variant

Code

import { ThemeToggle } from "@/components/ui/theme-toggle"

<ThemeToggle variant="outline" />