Icon buttons
An EuiButtonIcon is a button that only contains an icon (no text). Use the
display
and size
props to match the appearance of your EuiButtonIcon to other standard buttons. By default they will appear as xs
, empty
buttons.EuiButtonIcon requires an aria-label
to express the meaning to screen readers.
Props
EuiButtonIcon
Prop | Description and type | Default value |
---|---|---|
Prop iconType# | Description and type Type: IconType | Default value Required |
Prop href# | Description and type Type: string | Default value |
Prop type# | Description and type Type: string | Default value button |
Prop color# | Description and type Any of the named color palette options. "primary" | "text" | "accent" | "accentSecondary" | "success" | "warning" | "danger" | Default value primary |
Prop aria-label# | Description and type Defines a string value that labels the current element. string | Default value |
Prop aria-labelledby# | Description and type Identifies the element (or elements) that labels the current element. string | Default value |
Prop isDisabled# | Description and type Type: boolean | Default value |
Prop size# | Description and type Overall size of button. "xs" | "s" | "m" | Default value xs |
Prop iconSize# | Description and type Size of the icon only. "s" | "m" | "l" | "xl" | "xxl" | "original" | Default value m |
Prop isSelected# | Description and type Applies the boolean state as the boolean | Default value |
Prop display# | Description and type Sets the display style for matching other EuiButton types. "base" | "fill" | "empty" | Default value empty |
Prop isLoading# | Description and type Disables the button and changes the icon to a loading spinner boolean | Default value |
Prop className# | Description and type Type: string | Default value |
Prop data-test-subj# | Description and type Type: string | Default value |
Prop css# | Description and type Type: Interpolation<Theme> | Default value |
Prop onClick# | Description and type Type: MouseEventHandler<HTMLAnchorElement> | MouseEventHandler<HTMLButtonElement> | Default value |
Prop buttonRef# | Description and type Type: Ref<HTMLAnchorElement> | Ref<HTMLButtonElement> | Default value |