-
Notifications
You must be signed in to change notification settings - Fork 161
Icon Specification
Maria Tsvyatkova edited this page Jan 11, 2022
·
2 revisions
igx-icon
component should allow using of various icon/font families.
It is providing a way to add material-icons in the markup.
As a developer I want to be able to provide a way to show variety of material icon families.
<igx-icon family="material" name="home"
active="false">
</igx-icon>
Icon should represents certain image/state.
- Be able to change family.
- Be able to change name of the icon. Name represents icon value (example: name="home" will show house icon).
- Be able to change icon state active/inactive.
As an end user, I want to be given a visual representation of material icon families.
As a developer I can programatically get/set all of the icon properties.
The end user interface consists of:
-
Image-like icon value.
-
Two states of availability.
Properties
-
family
- set the family to family="material" to select the material icons set (default). -
name
- set the icon by providing its name from the official material icons set name="home". -
active
- set the icon to active/inactive by providing setting active="true" to true or false (default is true).
Methods
-
getFamily()
- returns the icon font family. -
getName()
- returns the icon name. -
getActive()
- returns the icon active state. -
getSvg()
- returns the underlying SVG image as SafeHtml. -
template()
- returns a TemplateRef to explicit, svg or no ligature.