SidebarPanelWidget
SidebarPanelWidget renders a slide-over panel anchored to the left or right edge of the deck overlay.
Usage
import {ColumnPanel, MarkdownPanel} from '@deck.gl-community/panels';
import {SidebarPanelWidget} from '@deck.gl-community/widgets';
const inspectorPanel = new ColumnPanel({
id: 'inspector',
title: 'Inspector',
panels: {
details: new MarkdownPanel({
id: 'details',
title: 'Details',
markdown: 'Persistent controls and context.'
})
}
});
const widget = new SidebarPanelWidget({
id: 'inspector-widget',
panel: inspectorPanel,
side: 'right'
});
Use SidebarPanelWidget for persistent controls, inspector panels, or other UI that should stay reachable while the user continues interacting with the visualization.
Import panel definitions from @deck.gl-community/panels and pass them to SidebarPanelWidget
through panel or container.
Props
type SidebarPanelWidgetProps = WidgetProps & {
icon?: string;
container?: WidgetContainer;
panel?: WidgetPanel;
side?: 'left' | 'right';
widthPx?: number;
placement?: WidgetPlacement;
title?: string;
defaultOpen?: boolean;
open?: boolean;
onOpenChange?: (open: boolean) => void;
triggerLabel?: string;
triggerIcon?: string;
hideTrigger?: boolean;
button?: boolean;
};
Remarks
- Accepts either a full panel
containerdescription or a singlepanel. - Slides open from the selected edge while keeping the shell mounted for smooth animation.
- Can render with a built-in handle trigger or stay externally controlled.
- Stops pointer, mouse, touch, and wheel propagation so sidebar interactions do not leak into the deck canvas.
- Reparents itself to the full widget overlay so the sidebar can span the full deck edge.