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-buttonInstallation
1 · Add registry to components.json
2 · Install component
Examples
Variants
Ghost, outline, and default variants.
Sizes
Three sizes.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "ghost" | "outline" | "overlay" | "ghost" | Visual style. |
size | "sm" | "default" | "lg" | "default" | Controls dimensions (sm: 28px, default: 36px, lg: 44px). |
asChild | boolean | false | Render as a Slot for custom element types. |