Lightning: Hide Utility Bar Item based on conditions

We are using utility bar component to display notifications for users:

But according to our delivery practice, we are always providing feature toggle for every new feature released, e.g. some boolean flag in custom settings to tick for client’s admin.

The problem here is how to hide completely such utility bar component based on condition.

So far we’ve been playing with UtilityBarAPI ( to set width and height to 0, remove icons and titles etc.
Is there any better way to achieve this?


At this moment, no option exist for toggle switch on Utility Bar level because we can’t control the Component Visibility on those items by conditions.

Check the following idea and please vote for it:

As a workaround, I suggest the following: the app level visibility could be an option to get what you want. Depends on how complicated your app from component number standpoint, maybe it can work out for you.

Source : Link , Question Author : wesaw , Answer Author : MaCsi

Leave a Comment