variant
"default" | "brand"
Default: "default"
Rendered as a <button>
by default. The icon can be specified using the icon
prop. Also includes a branded variant for different contexts.
<Flex gap="16px"><IconButtonicon={<ChevronRightIcon />}label="Slide Right"/><IconButtonicon={<ChevronRightIcon />}label="Slide Right"variant="brand"/></Flex>
<IconButton>
can be inverted for a more subtle appearance. Best used on darker backgrounds.
<Boxatoms={{backgroundColor: 'global-default',borderRadius: '8px',display: 'inline-block',padding: '16px'}}theme="dark"><Flex gap="16px"><IconButtonicon={<PauseIcon />}invertedlabel="Play"/><IconButtonicon={<PauseIcon />}invertedlabel="Play"variant="brand"/></Flex></Box>
<IconButtonicon={<PlayIcon />}label="Play"onClick={function noRefCheck() {}}/>
<button>
is not keyboard focusable with tabIndex={-1}
.
<IconButtonicon={<ChevronRightIcon />}label="Slide Right"tabIndex={-1}/>
variant
"default" | "brand"
Default: "default"
inverted
boolean
Default: false
as
"button" | "div"
Default: "button"
icon
ReactNode
Specified icon will be rendered in center of button.
label
ReactNode
Labels the specified icon. If `null` is passed the button will be hidden from assistive devices.
atoms
Applies permitted design system styles. See styling documentation for more.