variant
"default" | "brand" | "tertiary"
Default: "default"
Rendered as a <button> by default. The icon can be specified using the icon prop. Also includes brand and tertiary variants for different contexts.
<Flexatoms={{backgroundColor: 'global-well',borderRadius: 'card',padding: '16px'}}gap="16px"><UnknownElementTypeicon={<ChevronRightIcon />}label="Slide Right"/><UnknownElementTypeicon={<ChevronRightIcon />}label="Slide Right"variant="brand"/><UnknownElementTypeicon={<ChevronRightIcon />}label="Slide Right"variant="tertiary"/></Flex>
Using the inline prop makes <IconButton /> render more appropriately within inline layouts.
<Stackatoms={{backgroundColor: 'global-well',borderRadius: 'card',padding: '16px'}}gap="16px"><Flex gap="16px"><UnknownElementTypeicon={<ChevronRightIcon />}inlinelabel="Slide Right"/><UnknownElementType>Discover more</UnknownElementType></Flex><Flex gap="16px"><UnknownElementTypeicon={<ChevronRightIcon />}inlinelabel="Slide Right"variant="tertiary"/><UnknownElementType variant="textTertiary">Discover more</UnknownElementType></Flex></Stack>
<IconButton> can be inverted for a more subtle appearance. Best used on darker backgrounds.
<Boxatoms={{backgroundColor: 'global-default',borderRadius: 'standout',display: 'inline-block',padding: '16px'}}theme="dark"><Flex gap="16px"><UnknownElementTypeicon={<PauseIcon />}invertedlabel="Play"/><UnknownElementTypeicon={<PauseIcon />}invertedlabel="Play"variant="brand"/></Flex></Box>
<UnknownElementTypeicon={<PlayIcon />}label="Play"onClick={function noRefCheck() {}}/>
variant"default" | "brand" | "tertiary"
Default: "default"
invertedboolean
Default: false
inlineboolean
Default: false
as"button" | "div"
Default: "button"
iconReactNode
Specified icon will be rendered in center of button.
labelReactNode
Labels the specified icon. If `null` is passed the button will be hidden from assistive devices.