Icon Button

A round, icon-only button component for compact actions — supports primary, secondary, and transparent variants with glass styling.

Installation

npx chilli@latest add icon-button

Variants

Sizes

Glass Style

States

API Reference

IconButton

PropTypeDefaultDescription
variant"primary" | "secondary" | "transparent""primary"Visual style of the button.
size"xsm" | "sm" | "md" | "lg""md"Size of the button (always square).
glassbooleanfalseSurface style — glass adds backdrop blur and border.
iconLucideIconRequired. The icon to display.
loadingbooleanfalseShows a spinner and disables the button.
disabledbooleanfalseDisables the button.
asChildbooleanfalseMerge props onto child element.
classNamestringAdditional CSS classes to merge.