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


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:

Lightning Icons

To know more about the icons refer to

Write a Response

Your email address will not be published.

Find Out How We Can Help

If you're ready to find out more about how SimplusLabs can help energize your workers, your customers, and your business with a different experience, let's talk.