Back to Components
Settings

Theme Switcher

Toggle group for light, dark, and system theme preferences with inline SVG icons.

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/theme-switcher.tsx

Installation

Using shadcn CLI

npx shadcn add theme-switcher --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge