A version of Button that uses an icon alone for its
label.
Design guidance
When and how to use this
Use a IconButton to allow a user to perform an action related to the content
currently displayed. IconButton is particularly well suited for compact
parts of the interface such as toolbars and as a trigger for
Menu or Popover.
When to consider something else
If the action associated with an interaction is a navigation, consider using a
Link instead.
React
IconButton composes the Button component and
supports the same colors, sizes and variants.
A light color is also available for use on dark backgrounds.
The React Native IconButton mirrors the variant, size, and state props
documented above (including isDisabled, isLoading, and iconBefore /
iconAfter analogues) and ships from @hoverinc/design-system-react-native.
Selected
Set the isSelected prop to render the IconButton in a selected (pressed-on)
state. This is the right prop for icon-only toggles such as filter chips or
segmented controls. Selected styling (typically a ring or fill matching the
active variant) is driven by the variant. aria-pressed is set automatically
when isSelected is provided so assistive technologies announce the toggle
state. The label prop remains required for accessibility.