getInfo() for Lightning Experience

Returns the state of the current utility as a utilityInfo object. This method is available for Lightning Web Components (LWC) only.

NameTypeDescription
utilityIdstringThe ID of the utility for which to retrieve the state.

This component retrieves the utilityInfo object.

To make your component available for use in a utility bar, specify the lightning__UtilityBar target in the component’s configuration file.

This method returns a promise that resolves to a utilityInfo object representing the enclosing utility, containing the following fields. The promise is rejected on error.

NameTypeDescription
idstringThe ID of the utility.
isLoadedbooleanWhether the utility is loaded.
utilityLabelstringThe label of the utility.
utilityIconstringThe SLDS icon ID of the utility’s icon.
utilityIconVariantstringThe SLDS icon variant of the utility’s icon.
utilityHighlightedbooleanWhether the utility is highlighted.
utilityVisiblebooleanWhether the utility is visible.
utilityPoppedOutbooleanWhether the utility is popped out.
panelHeaderLabelstringThe label of the utility panel.
panelHeaderIconstringThe SLDS icon ID of the utility panel’s icon.
panelHeaderIconVariantstringThe SLDS icon variant of the utility panel’s icon.
panelHeightintegerThe height of the utility panel in pixels.
panelWidthintegerThe width of the utility panel in pixels

See Also