IconButton

The IconButton component is a transparent <button> element with an icon.

<IconButton
  title='Search button'
  onClick={() => {console.log('Search button clicked!')}}
  mr={2}
  icon={
    <Search
      color='primary'
      size={36}
    />
  }
/>
<IconButton
  disabled
  mr={2}
  icon={<Plus />}
/>
<IconButton
  variation='outline'
  icon={<Bookmark />}
/>

Be sure to include a title attribute for accessibility.

Props

PropTypeDescription
disabledboolDisables the button and applies a light color
iconnodeSets the button's svg icon
onClickfunctionSets a function to execute on click
titlestringHTML title attribute
variationfill, outlineThe button variation