# EuiIconButtonComponent

**Type:** component



A clickable button component that displays only an icon without text. Provides visual feedback states and supports various sizing and styling options. Commonly used in toolbars, navigation bars, and compact UI layouts where space is limited.

### Basic icon button
```html
<eui-icon-button
  icon="edit"
  ariaLabel="Edit item"
  (buttonClick)="onEdit()">
</eui-icon-button>
```

### With state variant
```html
<eui-icon-button
  icon="delete"
  euiDanger
  size="l"
  ariaLabel="Delete item">
</eui-icon-button>
```

### Accessibility
- Always provide descriptive `ariaLabel` for screen readers
- Button is keyboard accessible via Tab and Enter/Space
- Focus states are clearly visible

### Notes
- Use `hasNoPadding` for compact layouts or icon-only toolbars
- Apply `euiRounded` for circular button shape
- Set `euiDisabled` to prevent interaction
- Choose between `hasFocusHoverColor` and `hasFocusHoverBg` for hover effects


**Selector:** `eui-icon-button`

## Inputs
- **ariaLabel**: `string` - Accessible label for screen readers describing the button's purpose.
- **euiDisabled**: `boolean` - Disables the button, preventing interaction and applying disabled styling. Default: false
- **euiRounded**: `boolean` - Applies rounded corners to the button shape instead of default square corners. Default: false
- **fillColor**: `string` - CSS color value to apply as the icon fill color. Overrides default theme colors.
- **hasFocusHoverBg**: `boolean` - Applies background color change on focus and hover states. Automatically disabled when hasFocusHoverColor is true. Default: true
- **hasFocusHoverColor**: `boolean` - Applies color change on focus and hover states instead of background change. Mutually exclusive with hasFocusHoverBg. Default: false
- **hasNoPadding**: `boolean` - Removes internal padding from the button, allowing the icon to fill the entire button area. Default: false
- **hasOverflowHover**: `boolean` - Enables hover state that expands beyond the button boundaries, typically used in dense layouts. Default: false
- **icon**: `string` - The name of the icon to display from the eUI icon library.
- **iconUrl**: `string` - URL path to a custom icon image. Used when displaying icons not available in the eUI icon library.
- **size**: `"2xs" | "xs" | "s" | "m" | "l" | "xl" | "2xl" | "3xl" | "4xl"` - Controls the icon dimensions. Default: 'm'
- **tabindex**: `number` - Tab order position for keyboard navigation. Set to -1 to remove from tab sequence. Default: 0
- **euiPrimary**: `any` - From host directive: #[[file:BaseStatesDirective.md]]
- **euiSecondary**: `any` - From host directive: #[[file:BaseStatesDirective.md]]
- **euiSuccess**: `any` - From host directive: #[[file:BaseStatesDirective.md]]
- **euiInfo**: `any` - From host directive: #[[file:BaseStatesDirective.md]]
- **euiWarning**: `any` - From host directive: #[[file:BaseStatesDirective.md]]
- **euiDanger**: `any` - From host directive: #[[file:BaseStatesDirective.md]]
- **euiVariant**: `any` - From host directive: #[[file:BaseStatesDirective.md]]
- **euiSizeS**: `any` - From host directive: #[[file:BaseStatesDirective.md]]

## Outputs
- **buttonClick**: `EventEmitter` - Emitted when the button is clicked. Payload contains the native click Event object.
