Icons are either used to decorate a site or application or convey meaning for certain elements within a site or application.
Use the iconName
property to specify which icon to render.
Four standard sizes are supported: 'lg'
, 'md'
, 'sm'
(the default) and 'xs'
. A number of other sizes exist to complete the size ramp (see the size
property for a full list). Use the size
property to set the size.
Property | Type | Default | Description |
---|---|---|---|
iconName | String | Required | The name of the desired icon. See Available Icons for a complete list. NOTE: If you use warning-icon this component will render an <svg> , all other icons render an <i> |
ariaLabel | String | Required (unless ariaHidden is true) | Text to describe the icon. The value is placed in the aria-label attribute. |
Boolean | false | The value for the aria-hidden attribute. Set to true when there is already visible text explaining the icon or the icon is purely for decoration. | |
className | String | Custom classes to add to the icon’s tag. | |
size | String | 'sm' | Icon size. Options are 'lg' , 'lg-minus' , 'md-plus' , 'md' , 'md-minus' , 'sm-plus' , 'sm' , 'sm-minus' , 'xs-plus' , 'xs' . |