SidebarPanelContainer
SidebarPanelContainer renders panel content in a slide-over sidebar attached to the left or right edge.
Use it when controls or reference content should stay reachable while the user continues interacting with the surrounding standalone UI.
Usage
import {
ColumnPanel,
MarkdownPanel,
PanelManager,
SidebarPanelContainer,
type SidebarPanelContainerProps
} from '@deck.gl-community/panels';
const inspectorPanel = new ColumnPanel({
id: 'inspector',
title: 'Inspector',
panels: [
new MarkdownPanel({
id: 'details',
title: 'Details',
markdown: 'Persistent standalone controls and context.'
})
]
});
const panelSidebar = new SidebarPanelContainer({
id: 'inspector-sidebar',
panel: inspectorPanel,
side: 'right',
title: 'Inspector'
});
const panelManager = new PanelManager({
parentElement: document.getElementById('app') as HTMLElement
});
panelManager.setProps({
components: [panelSidebar]
});
Props
type SidebarPanelContainerProps = PanelContainerProps & {
panel?: Panel;
side?: 'left' | 'right';
widthPx?: number;
placement?: PanelPlacement;
title?: string;
defaultOpen?: boolean;
open?: boolean;
onOpenChange?: (open: boolean) => void;
triggerLabel?: string;
triggerIcon?: string;
showTitleBar?: boolean;
hideTrigger?: boolean;
button?: boolean;
openShortcuts?: KeyboardShortcut[];
shortcuts?: KeyboardShortcut[];
viewportMarginPx?: number;
dockTriggerWhenOpen?: boolean;
showBackdrop?: boolean;
};
Remarks
- Accepts one reusable panel definition.
- Slides open from the selected edge while keeping the shell mounted for smooth transitions.
- Supports controlled and uncontrolled open state.
triggerIconaccepts a text glyph or a data/http(s) image URL rendered as a CSS mask icon.- Supports
Escapeclose, optional backdrop close, and focus restoration todeck.canvasafter close. openShortcutsandshortcutsare registered through structuraldeck.eventManageraccess when available.viewportMarginPxcontrols the docked panel margin, anddockTriggerWhenOpenkeeps the trigger aligned beside the open panel.- Use
SidebarPanelWidgetfrom@deck.gl-community/widgetswhen the same UI should be mounted through deck.gl.