Last modified: August 22, 2025
The Panel component renders a panel overlay on the right side of the page and contains other components. Like the Modal component, you’ll include the Panel component in an overlay prop within a Button, LoadingButton, Link, Tag, or Image component.

Panel component uses three subcomponents to control its design and content, which follows the general structure below:
- <Panel>: the outermost container. It must be a top-level component. You cannot put a- Panelinside another component, such as- Flex.- <PanelBody>: the container that wraps the panel’s content and makes it scrollable. Include only one- PanelBodyper- Panel.
- <PanelFooter>: a sticky footer component at the bottom of the panel. Include only one- PanelFooterper- Panel.
 
Props
Below are the props available forPanel and PanelSection.
<Panel> props
| Prop | Type | Description | 
|---|---|---|
| id | String | A unique ID for the panel. | 
| onOpen | onOpen() => void | A function that will be invoked when the panel has finished opening. | 
| onClose | onClose() => void | A function that will be invoked when the panel has finished closing. | 
| width | 'sm','small'(default) |'md','medium'|'lg','large' | The width of the panel. | 
| title | String | The text that displays at the top of the panel. | 
| variant | 'modal'|'default'(default) | The panel variant. The modalvariant includes better screen reader focus on the panel and is recommended for visual and motor accessibility and tab navigation. See variants for more information. | 
| aria-label | String | The panel’s accessibility label. | 
<PanelSection> props
| Prop | Type | Description | 
|---|---|---|
| flush | Boolean | When set to true, the section will have no bottom margin. Default isfalse. | 
Opening and closing panels
By default, HubSpot handles opening the panel when the user clicks the parent Button, LoadingButton, Link, Tag, or Image component. A close button will also be included in the top right of the panel.
Button, LoadingButton, Link, Tag or Image with an onClick event that triggers the closeOverlay action. To use this action, you’ll need to include the actions argument in hubspot.extend() as seen in the example code below. /apps/developer-platform/add-features/ui-extensibility/ui-extensions-sdk#registering-the-extension
Learn more about opening and closing overlays.
Please note:
- You can only have one panel open at a time. Opening a panel while another is already open will cause the first one to close.
- A Modalcan be opened from aPanel, but aPanelcannot be opened from aModal.
Variants
By default, the panel will only obscure the content on the right side of the page where it opens. Using thevariants prop, you can add an additional overlay behind the panel to blur the rest of the page. This variant puts more focus on the panel and improves accessibility for users with screen readers. Because the modal variant obscures the rest of the page’s content, use it only when users don’t need other context from the page.
