IconButton is a square Pressable that shows one icon. It takes the same variant values as Button and handles taps with onPress. See the web IconButton page for more on when to use it.
An icon alone tells a screen reader nothing, so give every IconButton an ariaLabel. Without one, and without children, it logs a warning.
size takes xs to xl, from 20 to 48 points square. m (32 points) is the default. Every size takes taps from a 44 point area. rounded makes it a circle.
color sets the icon colour, such as "brand-medium". By default it follows the variant. Children replace the icon, for an element of your own.
- No tooltip. There is no hover on a touch screen. tooltip is still accepted and becomes the accessible name when ariaLabel is not set.
- onPress. Taps go to onPress, as on any Pressable. There is no onClick or href.
- Pressed, not hover. The variant's pressed colours show while the finger is down.
IconButton also takes every React Native Pressable prop except children and style, which it replaces.