open() for Lightning Experience

Opens a utility. If the utility is already open, this method has no effect. Only one utility can be open at a time. If another utility is already open, open() minimizes the utility. This method is available for Lightning Web Components (LWC) only.

Optional parameters are passed into an object as the last argument of the method.

NameTypeDescription
utilityIdstringThe ID of the utility to open.
autoFocusobjectOptional. Specifies whether the utility item to open has focus.

This component opens a utility using the enclosing utility ID.

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

Returns a promise that resolves to true if successful. The promise is rejected on error.