Newer Version Available
setUtilityHighlighted() for Lightning Experience
Sets a utility as highlighted, giving it a more prominent background color and
badge.
Arguments
| Name | Type | Description |
|---|---|---|
| highlighted | boolean | Whether the utility is highlighted. Makes a utility more prominent by giving it a different background color. |
Sample Code
This component, when added to a single-column Lightning page used in a utility bar, sets a utility as highlighted when the button is pressed.
Component code:
1<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
2 <force:utilityBarAPIAccess aura:id="utilitybar" />
3 <lightning:button label="Set Utility Highlighted" onclick="{! c.setUtilityHighlighted }"/>
4</aura:component>Controller code:
1({
2 setUtilityHighlighted : function(component, event, helper) {
3 var utilityAPI = component.find("utilitybar");
4 utilityAPI.setUtilityHighlighted(true);
5 }
6})Response
None.