Icon

Icons are essential in web development as they enhance user experience by providing visual cues, improving navigation, and making interfaces more intuitive. They help in quickly conveying actions or information, reducing the need for extensive text, and contributing to a clean, visually appealing design.

1. Icon source

Mercury provides an utility function to get any icon from the library called getIconPath. To set the icon on the ch-image:

  1. Import getIconPath.
  2. Use getIconPath to declare the category, name, and optional color type of the icon in a variable.
  3. Use the variable in the ch-image src property.

2. Size: small

3. Size: medium

4. Mask