About
A button that smoothly morphs between two icons when clicked, useful for copy-to-clipboard confirmations or theme toggles.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Icon Toggle to your project and fits it to your theme.
Code
How Icon Toggle is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { IconToggle } from "@/components/ui/icon-toggle";
import { Sun, Moon } from "lucide-react";
export default function IconToggleDemo() {
return (
<div className="flex items-center justify-center w-full h-screen bg-background">
<IconToggle from={<Sun />} to={<Moon />} />
</div>
);
}












