SiIconLegacyComponent documentation¶
import { SiIconLegacyComponent } from '@siemens/element-ng/icon'; Deprecated: This component should no longer be used. Use the SiIconComponent instead. Existing usages can be replaced as follows:
<!-- before -->
<si-icon icon="element-user" color="text-danger" />
<!-- after -->
<si-icon icon="element-user" class="icon text-danger" />
Important: Previously, the class icon was automatically applied. Unless not needed, it must now be applied manually. The icon class scales up the icon compared to its surrounding text.
Stacked icons need to be constructed in HTML directly. If applicable, the si-status-icon component should be used instead.
<!-- before -->
<si-icon
icon="element-circle-filled"
color="status-success"
stackedIcon="element-state-tick"
stackedColor="status-success-contrast"
alt="Success"
/>
<!-- after -->
<div class="icon-stack icon" aria-label="Success">
<si-icon icon="element-circle-filled" class="status-success" />
<si-icon icon="element-state-tick" class="status-success-contrast" />
</div>
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| alt ¶ | TranslatableString | undefined | Alternative name or translation key for icon. Used for A11y. | |
| color ¶ | string | undefined | Color class, see https://element.siemens.io/fundamentals/typography/#color-variants-classes | |
| icon ¶ | string | undefined | Icon token, see https://element.siemens.io/icons/element | |
| size ¶ | string | 'icon' | Text-size class for icon size, see https://element.siemens.io/fundamentals/typography/#type-styles-classes |
| stackedColor ¶ | string | undefined | Color class, see https://element.siemens.io/fundamentals/icons/ | |
| stackedIcon ¶ | string | undefined | Icon token, see https://element.siemens.io/fundamentals/icons/ |
Types Documentation¶
Represents a translatable string. This can either be a translation key, e.g. import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.
Except where otherwise noted, content on this site is licensed under MIT License.