1.0.3 • Published 4 years ago

@openremote/or-icon v1.0.3

Weekly downloads
1
License
AGPL-3.0-or-later
Repository
-
Last release
4 years ago

@openremote/or-icon \<or-icon>

NPM Version Linux Build Test Coverage

Web Component for displaying an icon from a loaded iconset.

Install

npm i @openremote/or-icon
yarn add @openremote/or-icon

Usage

For a full list of properties, methods and options refer to the TypeDoc generated documentation.

Icons are defined in iconsets, there are two iconsets provided by default and new ones can be created as required (see demo-core), The mdi iconset is quite large and it is possible to prevent loading of this when initialising the OpenRemote Manager via the ManagerConfig:

The default iconset is mdi but this can be changed by setting OrIcon.DEFAULT_ICONSET, to load an icon use the following HTML:

<or-icon icon="mdi:access-point" />

If using the default iconset then the iconset prefix can be omitted:

<or-icon icon="access-point" />

Styling is done through CSS, the following CSS variables can be used:

--or-icon-fill (default: currentcolor)
--or-icon-stroke (default: none)
--or-icon-height (default: 24px)
--or-icon-width (default: 24px)
--or-icon-pointer-events (default: none)

When an iconset is added then any or-icon components in the DOM will be notified and refresh as required.

Supported Browsers

The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition, Internet Explorer 11 is also supported.

License

GNU AGPL