IconButton
IconButton — Prism component.
Signature
Density
Viewport
Theme follows the navbar ☀/☾ toggleWhen to use
- Use it when A compact, icon-only action where space is tight (toolbars, table rows, cards).
- Reach for something else when Primary or ambiguous actions — if the meaning isn’t universally obvious, use a labelled
Button.
Accessibility
Requires an aria-label — there is no visible text. Keyboard activated with Enter/Space.
Import
const { IconButton } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
variant | "quiet" | "neutral" | "accent" | — | |
size | "sm" | "md" | "lg" | — | |
shape | "square" | "round" | — | square (rounded-rect, default) or round (circular). |
isDisabled | boolean | — | |
onPress | (e: React.MouseEvent) => void | — | REQUIRED for accessibility — describes the action. |
onClick | (e: React.MouseEvent) => void | — | |
children | React.ReactNode | — | The icon node. |
className | string | — |