About
A square button sized for a single icon-only action, with small/default/large sizes, every button variant, and a required aria-label so it stays accessible.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Icon Button to your project and fits it to your theme.
Code
How Icon Button is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { IconButton } from "@/components/ui/icon-button";
import {
BellIcon,
DownloadIcon,
PencilIcon,
PlusIcon,
Trash2Icon,
} from "lucide-react";
export default function IconButtonDemo() {
return (
<div className="flex flex-wrap items-center gap-2">
<IconButton variant="default" aria-label="Edit">
<PencilIcon />
</IconButton>
<IconButton aria-label="Download">
<DownloadIcon />
</IconButton>
<IconButton variant="ghost" aria-label="Notifications">
<BellIcon />
</IconButton>
<IconButton variant="soft" aria-label="Add">
<PlusIcon />
</IconButton>
<IconButton variant="destructive" aria-label="Delete">
<Trash2Icon />
</IconButton>
</div>
);
}














