lightning:utilityBarAPI Example

This component allows you to access methods for programmatically controlling a utility within the utility bar of a Lightning app. The utility bar is a footer that gives users quick access to frequently used tools and components. Each utility is a single-column Lightning page that includes a standard or custom Lightning component.

To access the methods, create an instance of the lightning:utilityBarAPI component inside of your utility and assign an aura:id attribute to it.

Here is the lightning component

 

Add Component to lightning App Utility Bar items

You can see Utility bar as shown below

On click on Set Utility highlighted which  Makes a utility more prominent by giving it a different background color as shown below