IconComponent
Defined in: components/icon/icon.component.ts:39
A reusable UI component for displaying icons in Angular applications. Supports reactive input signals for dynamic updates.
Example
html
<!-- Using a static icon name -->
<!-- "icon" receives a string literal -->
<!-- "prefix" selects the FontAwesome style/weight (solid, regular, light, duotone, brands, etc. Regular, in this example) -->
<ogs-m3-icon
icon="myIconName"
prefix="far" />
<!-- Using Angular property binding -->
<!-- The icon name is taken dynamically from your component (data.iconName) -->
<!-- Used default prefix ("fas") -->
<ogs-m3-icon
[icon]="data.iconName" />Remarks
Ideal for modern Angular applications following Material Design 3 guidelines.
Since
1.0.0
Author
Simon Kovtyk
Constructors
Constructor
ts
new IconComponent(): IconComponent;Defined in: components/icon/icon.component.ts:61
Returns
IconComponent
Properties
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
icon | readonly | InputSignal<IconName> | undefined | The name of the icon to display. A reactive input signal, required and must be provided for the component to render the icon correctly. | components/icon/icon.component.ts:52 |
prefix | readonly | InputSignal<IconPrefix> | "fas" | The prefix of the icon set (e.g., "fas", "far", "fab"). A reactive input signal should be used to specify which icon style set the component should use. | components/icon/icon.component.ts:59 |