About
Animated dark / light mode toggle button with a spring-driven sun ↔ moon icon swap and View Transition page reveal. Built on next-themes and Motion.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Theme Switch to your project and fits it to your theme.
Code
How Theme Switch is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client"
import { ThemeProvider } from "next-themes"
import { ThemeSwitch } from "@/components/ui/unlumen-theme-switch"
export default function ThemeSwitchDemo() {
return (
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem={false}>
<div className="flex items-center justify-center gap-4 p-8">
<ThemeSwitch iconSize={16} />
</div>
</ThemeProvider>
);
}







