setUtilityIcon() for Lightning Experience
Sets the icon of a utility. This icon is displayed in the utility bar. This method isn’t supported for Lightning Web Components (LWC).
For LWC usage, see updateUtility() for Lightning Experience.
| Name | Type | Description |
|---|---|---|
utilityId | string | The ID of the utility on which to set the icon. Optional when called within a utility. |
icon | string | An SLDS utility icon key that is displayed in the utility bar. See a full list of utility icon keys on the SLDS reference site. |
options | object | Optional. Additional options that modify the appearance of the utility icon.
|
This component, when added to a single-column Lightning page used in a utility bar, sets the icon of the utility to a green SLDS “insert_tag_field” icon when the button is pressed.
Component code:
Controller code:
This method returns a promise that, upon success, resolves to true.
),
), and
).