Preview
Installation
<> import.ts
import { IconButton } from "@/components/ui/icon-button"Code
<> component.tsx
import { IconButton } from "@/components/ui/icon-button"
<IconButton />API Reference
IconButton
A circular icon button or anchor with hover states and sizes.
<> import.ts
import { IconButton } from "@/components/ui/icon-button"Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | Icon content |
onClick | () => void | — | Click handler |
href | string | — | If provided, renders as a link |
target | "_blank" | "_self" | "_parent" | "_top" | "_blank" | Link target when using href |
className | string | "" | Additional CSS classes |
disabled | boolean | false | Disable the button |
size | "sm" | "md" | "lg" | "md" | Button diameter |