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

PropTypeDefaultDescription
children
React.ReactNodeIcon content
onClick
() => voidClick handler
href
stringIf provided, renders as a link
target
"_blank" | "_self" | "_parent" | "_top""_blank"Link target when using href
className
string""Additional CSS classes
disabled
booleanfalseDisable the button
size
"sm" | "md" | "lg""md"Button diameter