Overview
Icon-only button with tooltip, badge, toggle and FAB support. 6 variants, 5 sizes.
Icon button variants
Every icon-only action needs a concise accessible name.
Use icon buttons only for actions with widely understood symbols and provide an aria-label that describes the action.
Anatomy
- Root container and spacing boundary.
- Primary content and optional secondary metadata.
- State indicators and utility affordances (icons, badges, controls).
- Optional helper text, grouping, and behavioral wrappers.
When to use
- Choose IconButton when a repeated, structured interaction is required.
- Use it for clear, consistent operations across similar surfaces.
- Use in forms, lists, and action workflows where clarity matters.
When not to use
- Do not use only for decorative layout without interaction meaning.
- Avoid duplicating the same behavior without distinct user context.
- Prefer simpler HTML or textual content for static, non-interactive labels.
Variants
Component variants should be documented by API props and examples below.
States
Common states include idle, active, disabled, focused, and loading/pending states where applicable.
Behavior
Behavior should remain deterministic and keyboard-friendly, with clear visual feedback for every state transition.
Accessibility
- Use semantic structure and visible labels whenever possible.
- Preserve keyboard navigation and focus visibility.
- Announce status and changes when context requires it.
Content guidelines
- Prefer short, clear labels.
- Keep content actions scannable and outcome-oriented.
- Use consistent wording across similar components.
Examples
Variants
6 emphasis levels — filled · outlined · tonal · ghost · standard · destructive. gradient is a boolean prop applied on top of a variant.
Sizes
xs · sm · md · lg · xl — all sizes keep a 44 × 44 px minimum touch target
Shape
circle (default) or square — square pairs well with FAB
Toggle
toggle enables a pressed / unpressed state with aria-pressed — click to switch
With badge
badge={true} shows a red dot · badge={n} shows a count (capped at 99+)
Loading
loading replaces the icon with a spinner and disables interaction
FAB (Floating Action Button)
fab adds an elevation shadow — pair with size='xl' and shape='square' for the classic Material FAB
Gradient
gradient is a boolean prop — applies a brand gradient on filled and destructive variants
Disabled
disabled reduces opacity and prevents all interaction
Props / API
Api Props
Props