open()

Opens a side panel on your app's dashboard page.

A side panel slides in alongside your dashboard page and renders the embeddable component you specify in componentId. Use a side panel to show secondary content, such as details, settings, or a short form, while keeping the current page in view.

To pass data to the panel, include it in componentProps. The component reads this data with observeState().

Notes:

  • Only embeddable components are supported. The component you reference in componentId must be an embeddable component, the same type you retrieve with getWidget(). Other dashboard extensions, such as pages, modals, and plugins, can't be opened in a side panel.
  • This method doesn't yet work when developing sites or building apps with Blocks.
  • To close the panel, call sidePanel.close() from the panel's component code.

Method declaration

Copy

Parameters

NameTypeDescription
optionsSidePanelOpenOptionsThe component to open and any data to pass to it.

SidePanelOpenOptions object

NameTypeDescription
componentIdstringID of the "embeddable component" extension to open in the side panel. This is the same embeddable component you retrieve with getWidget().
componentPropsRecord<string, Serializable>Optional. Data to pass to the component. The component reads this data with observeState(). Values must be serializable, so they can't include callbacks or other non-cloneable values.

Returns

void

Note: Don't use relative CSS height units such as vh in the component opened by this method. The host adjusts the component's height automatically. If your component uses relative height units by default, turn them off.

Examples

Note: To call this method in self-managed apps, you need to create a client. See the setup guide for more details.

Open a side panel

Copy

Pass data to a side panel

Copy

You can access the data passed to sidePanel.open() in your component code using observeState().

Did this help?