Icons
This section explains using the built-in icon sets and adding custom icons. In Jmix, icons can be added in numerous places.
Standalone Icons
When an icon has a meaning on its own, use the dedicated icon, svgIcon, or fontIcon component to place it anywhere on the view.
Icons in Visual Components
Visual components can have icons added in three declarative ways:
-
Attributes: Many components accept icons via attributes; certain components include several such attributes for different slots (for example
icon,uploadIcon,downloadButtonIcon,dropLabelIcon). This is the easiest way, but it does not support custom icons. -
Nested element: Some components support nesting an element (for example
<icon>,<uploadIcon>,<dropdownIcon>) that lets you provide custom icons – SVGs, font icons, or images. -
Prefix and suffix: Components may have prefix and suffix elements that can contain both standard and custom icons.
Icons can also be added programmatically.