packages/components/eui-icon-state/eui-icon-state.component.ts
Displays an icon with semantic state styling (primary, success, info, warning, danger). Combines icon rendering with state-based color variants for status indicators, alerts, and contextual UI elements. Inherits state inputs from BaseStatesDirective for consistent theming across the application.
<eui-icon-state
euiSuccess
size="m"
ariaLabel="Success">
</eui-icon-state><eui-icon-state
euiWarning
size="l"
ariaLabel="Warning: Action required">
</eui-icon-state>ariaLabel for meaningful icons| HostDirectives |
BaseStatesDirective
Inputs : euiPrimary euiSuccess euiInfo euiWarning euiDanger euiVariant
|
| selector | eui-icon-state |
| imports |
EUI_ICON
|
| templateUrl | ./eui-icon-state.component.html |
| styleUrl | ./eui-icon-state.component.scss |
Properties |
Inputs |
HostBindings |
Accessors |
| ariaLabel |
Type : string
|
|
Accessible label for screen readers describing the icon's purpose or meaning. Required for accessibility when the icon conveys semantic information. |
| size |
Type : "2xs" | "xs" | "s" | "m" | "l" | "xl" | "2xl" | "3xl" | "4xl"
|
Default value : 'm'
|
|
Controls the rendered size of the icon. |
| class |
Type : string
|
| baseStatesDirective |
Type : unknown
|
Default value : inject(BaseStatesDirective)
|
| cssClasses |
getcssClasses()
|