Theme Toggle

ComponentsReactFontAwesome

Dark/light mode switch with localStorage persistence and system preference detection. Button and icon variants.

Usage
1import { ThemeToggle } from "@/shared/ui/theme-toggle";
2
3// Button variant (default) — ghost button with icon
4<ThemeToggle />
5
6// Icon variant — minimal, for headers and toolbars
7<ThemeToggle variant="icon" />
8
9// With custom className
10<ThemeToggle variant="icon" className="text-primary" />

Built with Next.js, deployed from a couch in Indonesia.

© 2025 Erik Yuntantyo · turmerrific