Icon Button

A square icon-only button primitive. Forms the base for SaveButton, ShareButton, and RecordButton. Provides consistent sizing, focus rings, and variant styling.

core/icon-button

Installation

1 · Add registry to components.json

2 · Install component

Examples

Variants

Ghost, outline, and default variants.

Sizes

Three sizes.

API Reference

PropTypeDescription
variant
"ghost" | "outline" | "overlay"Visual style.
size
"sm" | "default" | "lg"Controls dimensions (sm: 28px, default: 36px, lg: 44px).
asChild
booleanRender as a Slot for custom element types.