Command Palette

Search for a command to run...

Theme Switcher/Theme Switcher Button

Theme Switcher Button

Button-based theme switcher with rotating icons

Open in v0

Overview

Minimalist button that toggles between light and dark themes with a single click. Perfect for compact navigation bars.

Installation

npx shadcn@latest add @elements/theme-switcher-button

Usage

import { ThemeSwitcherButton } from "@/components/theme-switcher-button";

export function Navbar() {
  return (
    <nav>
      <ThemeSwitcherButton />
    </nav>
  );
}

Features

  • One-click theme toggle
  • Animated icon transition
  • Minimal footprint
  • Accessible button