Back to Components
Components
Theme Toggle
Dark and light mode toggle with smooth icon transitions.
Dependencies
- clsx
- tailwind-merge
- lucide-react
- next-themes
Files
- components/ui/theme-toggle.tsx
Installation
Using shadcn CLI
npx shadcn add theme-toggle --url https://ui.hampton.ioManual installation
Copy the component file to your project and install dependencies:
npm install clsx tailwind-merge lucide-react next-themes