Uses of lightning:icon in lightning component and its types.

interact with lightning components


There are five different types of icons that can be used in lightning component:

  1. Action
  2. Custom
  3. Doctype
  4. Standard
  5. Utility

Lightning icons can be used in some of the lightning components like

  • lightning:button,
  • lightning:buttonIcon,
  • lightning:icon.

Usage of lightning:icon :

Consider following lightning component code for the usage:

The name of the icon is specified in the iconName attribute of the component. Along with, we can also specify the size and variant of the icon according to the requirement.

Types of sizes:

  1. xx-small
  2. x-small
  3. small
  4. medium(default)
  5. large

Types of variant:

  1. inverse
  2. warning
  3. error

The icons look as follows:

To know more about the icons refer to

Back to list

Leave a Reply

Your email address will not be published. Required fields are marked *