Skip to content

Icon

Icon component for using the Element icons.

See also the icons chapter in the fundamentals.

Code

Usage

import { SiIconComponent } from '@siemens/element-ng/icon';

@Component({
  imports: [SiIconComponent, ...]
})

Composite icons

Some symbols require overlapping of two icons. The example below shows how to build event state icons.

Status icons

Severity symbols can be built with status icons.

SiIconComponent API Documentation

import { SiIconComponent } from '@siemens/element-ng/icon';

Component to render a font or SVG icon depending on the configuration. If no SVG icon is found, the component will fall back to render the icon-font. In that case, an application must ensure that the icon font is loaded. This component will only attach the respective class.

The content of this component is hidden in the a11y tree. If needed, the consumer must set proper labels.

Input Properties

Name Type Description
icon required
string

Define which icon should be rendered. Provide using:

• value of the icon map provided by addIcons

• (not recommended): plain string in kebab-case or camelCase

Example:

import { elementUser } from '@siemens/element-icons';

@Component({template: `
  <si-icon [icon]="icons.elementUser" />
  <si-icon icon="element-user" />
  <si-icon icon="elementUser" />

`})
class MyComponent {
  icons = addIcons(elementUser);
}

SiStatusIconComponent API Documentation

import { SiStatusIconComponent } from '@siemens/element-ng/icon';

Input Properties

Name Type Description
status required
EntityStatusType

Status that determines the rendered stacked icon and accessible label.

Types Documentation

StatusType

'success' | 'info' | 'warning' | 'danger' | 'caution' | 'critical'
type alias


Except where otherwise noted, content on this site is licensed under MIT License.