packages/ecl/components/ecl-icon/ecl-icon.component.ts
ECL icon component – renders SVG icons from various sets depending on current theme. Integrates with ECL theming and supports accessibility options.
| HostDirectives |
ECLBaseDirective
|
| providers |
EclThemeService
|
| selector | ecl-icon |
| imports |
AsyncPipe
NgClass
|
| templateUrl | ./ecl-icon.component.html |
Properties |
|
Methods |
Inputs |
HostBindings |
Accessors |
constructor()
|
| ariaHidden |
Type : boolean
|
|
Determines whether the icon should be hidden from assistive technologies.
Defaults to |
| ariaLabelledby |
Type : string
|
|
ID reference for an external element that labels this icon for screen readers. |
| focusable |
Type : boolean
|
Default value : false
|
|
Controls whether the icon is focusable via keyboard.
Defaults to |
| icon |
Type : string
|
|
Name of the icon to render from the selected set. |
| isFlipHorizontal |
Type : boolean
|
Default value : false
|
|
Flips the icon horizontally if set to |
| role |
Type : string
|
|
ARIA role of the icon. If a |
| title |
Type : string
|
|
Title used for accessibility. Also affects |
| color |
Type : 'inverted' | 'primary' | null
|
Default value : null
|
|
Applies color styling to the icon.
Use |
| transform |
Type : string
|
|
Adds a transformation modifier to the icon (e.g., rotation). |
| class.ecl-u-bg-dark |
Type : boolean
|
|
Adds a dark background utility class if the color is set to |
| addExtraClass | ||||||
addExtraClass(className: string)
|
||||||
|
Parameters :
Returns :
void
|
| removeExtraClass | ||||||
removeExtraClass(className: string)
|
||||||
|
Parameters :
Returns :
void
|
| setExtraClasses | ||||||
setExtraClasses(classes: string)
|
||||||
|
Parameters :
Returns :
void
|
| baseDirective |
Type : unknown
|
Default value : inject(ECLBaseDirective)
|
| el |
Type : unknown
|
Default value : inject(ElementRef)
|
| Readonly extraClasses |
Type : unknown
|
Default value : signal<string>('')
|
|
Extra classes added programmatically by parent components (button, link, etc.) |
| Readonly hostClasses |
Type : unknown
|
Default value : signal<string>('')
|
|
Real classes currently present on |
| iconUrl$ |
Type : Observable<string>
|
| svgEl |
Type : ElementRef
|
Decorators :
@ViewChild('svg')
|
| isColorInverted |
getisColorInverted()
|
|
Adds a dark background utility class if the color is set to
Returns :
boolean
|