BenixBenix DSv1.1.0

IconButton

Compact icon-only button. Pairs well with toolbars, headers, and table row actions.

Examples

Variants

<IconButton icon={Bell} aria-label="Notifications" />
<IconButton icon={Search} variant="outline" aria-label="Search" />
<IconButton icon={Settings} variant="ghost" aria-label="Settings" />
<IconButton icon={Heart} variant="primary" aria-label="Like" />

Destructive

Use className with text-destructive for delete actions.

<IconButton
icon={Trash2}
variant="ghost"
aria-label="Delete"
className="text-destructive"
/>

Circular

<IconButton icon={Bell} roundedFull aria-label="Notifications" />

API Reference

Props of the IconButton component.

PropTypeDefaultDescription
icon*LucideIconLucide component to render.
variant'primary' | 'soft' | 'ghost' | 'outline''soft'
size'sm' | 'md' | 'lg''md'
activebooleanfalse
loadingbooleanfalse
iconSizenumberOverride default icon size for the size prop.
roundedFullbooleanfalseRender as a circle (default is rounded square).
aria-label*stringRequired for a11y.