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
:
- Import
getIconPath
. - Use
getIconPath
to declare the category, name, and optional color type of the icon in a variable. - Use the variable in the
ch-image
src
property.