packages/ecl/components/ecl-button/ecl-button.component.ts
Button component based on ECL design system.
Can render as a <button> or <a> element depending on usage.
Supports multiple visual variants and optional icon/indicator content.
| selector | button[eclButton], button[ecl-button], a[eclButton] |
| imports |
NgTemplateOutlet
EUI_ECL_ICON
|
| templateUrl | ./ecl-button.component.html |
Properties |
Methods |
Inputs |
HostBindings |
Accessors |
| containerStyleClass |
Type : string
|
|
Optional additional class to apply to the button container. |
| eclStyle |
Type : "highlight" | "inverted" | "neutral" | "default"
|
Default value : 'default'
|
| isIconOnly |
Default value : false, { transform: booleanAttribute }
|
|
Whether the button should be styled as icon-only.
When true, the |
| size |
Type : "s" | "m" | "l"
|
Default value : 'l'
|
| class |
Type : string
|
| e2eAttr |
Type : any
|
| tabindex |
Type : number
|
| class |
Type : string
|
|
Computes the full set of CSS classes to apply to the button element. |
| onFocus |
onFocus()
|
|
Manually focuses the button element.
Returns :
void
|
| getCssClasses | ||||||
getCssClasses(rootClass: string)
|
||||||
|
Parameters :
Returns :
string
|
| el |
Type : unknown
|
Default value : inject(ElementRef)
|
| hasIcon |
Type : unknown
|
Default value : computed(() => this.iconComponents().length > 0)
|
|
Indicates whether the button contains an icon. Used internally for styling logic. |
| hasIndicator |
Type : unknown
|
Default value : computed(() => !!this.indicator())
|
|
Indicates whether the button contains an indicator element. Used internally for styling logic. |
| cssClasses |
getcssClasses()
|
|
Computes the full set of CSS classes to apply to the button element.
Returns :
string
|