The library is still in early development. Breaking changes and bugs may occur without prior notice. Thanks for your interest in using the library!
A square button for icon-only actions, supporting all color and size variants.
Import the IconButton component from @bun-ui/react and use it in your project:
import { IconButton } from "@bun-ui/react"<IconButton>
<StarIcon />
</IconButton>The IconButton supports all the same color variants as Button:
The IconButton supports three square sizes: sm, md, and lg:
You can use the asChild prop to render the IconButton as a different element:
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | If true, the props of the button will be applied to the child element. |
color | "primary" | "secondary" | "destructive" | "accent" | "neutral" | "success" | "neutral" | Color of the IconButton. |
size | "xs" | "sm" | "md" | "lg" | "md" | Size of the IconButton. |