Getting started
Components
Side Panel is primarily used within AI experiences and on pages using the filter pattern when there are too many filter options to display on the page.
We currently only support having one Side Panel open on a page. If you have questions, please post a GitHub Discussion.
Side Panel and Side Modal are both used to display additional content on the side of the main page content. Side Panel is used for content that is not blocking and can be interacted with while the main page content is still visible. Side Panels are designed to remain open while the user completes other tasks in the main content of the page. Side Modals typically need to be closed before the user returns to their main task as the Modal overlays part of the page.
Pass the isOpen and setIsOpen props to the SidePanelContainer component to control the open and close state of the Side Panel.
Use the default variant of SidePanelFooter when you need to add actions to the bottom of the Side Panel. Use the chat variant of Side Panel Footer for AI use cases.
To internationalize Side Panel, simply pass different text as children to the Side Panel components. The only exceptions are the close button in the SidePanelHeader and the SidePanelButton/SidePanelBadgeButton. To change the buttons' accessible label text, use the i18nCloseSidePanelTitle and i18nOpenSidePanel props on the SidePanelContainer.
Side Panel comes with the option of using a hook to manage the open and close state of the panel. The useSidePanelState hook returns an object to spread onto SidePanelContainer. To change the default state of the Side Panel from closed to open, pass open: true to the hook.