← All Components

IconButton

Icon-only button with retro shadow, sized to fit SVG icons.

Variants

Sizes

Use Case: Password Toggle

Disabled

Props

PropTypeDescription
variant"default" | "secondary" | "outline" | "ghost"Visual style
size"sm" | "md" | "lg"Button and icon size
asChildbooleanRender as child element via Radix Slot
classNamestringAdditional classes on the root element

Usage

<IconButton variant="outline" size="sm" aria-label="Toggle password"> <EyeIcon /> </IconButton> <IconButton variant="ghost" aria-label="Close"> <XIcon /> </IconButton>