Variants
Sizes
Use Case: Password Toggle
Disabled
Props
| Prop | Type | Description |
|---|---|---|
| variant | "default" | "secondary" | "outline" | "ghost" | Visual style |
| size | "sm" | "md" | "lg" | Button and icon size |
| asChild | boolean | Render as child element via Radix Slot |
| className | string | Additional classes on the root element |
Usage
<IconButton variant="outline" size="sm" aria-label="Toggle password">
<EyeIcon />
</IconButton>
<IconButton variant="ghost" aria-label="Close">
<XIcon />
</IconButton>