IconButton is an accessible action element represented by an icon.
Use the variant
prop to switch between button styles.
variant
filled
Outlined
base
hover
active
disabled
<IconButton icon={<Icon id='settings' />} />
color
Display variant color
"primary"
disabled
Disables the element, preventing mouse and keyboard events
boolean
fullWidth
Toggles full width element layout
boolean
href
HTML element href
string
icon
Button content
ReactElement
size
Sets the display size
"small" | "large"
variant
Display variant
"filled" | "outlined"
wrapWhenDisabled
Indicates whether buttons in a disabled state should be wrapped with a span
boolean
You can use module augmentation to customize the TypeScript types for any of IconButton's props:
declare module 'componentry/types/components/IconButton/IconButton' {
interface IconButtonPropsOverrides {
// ... overwrite any types for IconButton props ...
}
}
See the TypeScript guide for more information.
.C9Y-IconButton-DisabledWrapper
.C9Y-IconButton-base
.C9Y-IconButton-filled
.C9Y-IconButton-largeSize
.C9Y-IconButton-outlined
.C9Y-IconButton-smallSize