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.
AfterViewInit
| selector | button[eclButton], button[ecl-button], a[eclButton] |
| imports |
NgTemplateOutlet
EUI_ECL_ICON
|
| templateUrl | ./ecl-button.component.html |
Properties |
|
Methods |
Inputs |
HostBindings |
Accessors |
constructor(el: ElementRef)
|
||||||
|
Parameters :
|
| containerStyleClass |
Type : string
|
|
Optional additional class to apply to the button container. |
| isIconOnly |
Type : boolean
|
Default value : false
|
|
Whether the button should be styled as icon-only.
When true, the |
| 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
|
| Public el |
Type : ElementRef
|
| iconComponents |
Type : QueryList<EclIconComponent>
|
Decorators :
@ContentChildren(undefined)
|
|
List of projected icon components inside the button. Used internally to detect presence of icons. |
| indicator |
Type : EclIndicatorDirective
|
Decorators :
@ContentChild(undefined)
|
|
Projected indicator element inside the button (e.g., for loading or notification). Used internally to detect its presence. |
| cssClasses |
getcssClasses()
|
|
Computes the full set of CSS classes to apply to the button element.
Returns :
string
|
| hasIcon |
gethasIcon()
|
|
Indicates whether the button contains an icon. Used internally for styling logic.
Returns :
boolean
|
| hasIndicator |
gethasIndicator()
|
|
Indicates whether the button contains an indicator element. Used internally for styling logic.
Returns :
boolean
|