PanelComponent
PanelComponent is the root mountable UI class owned by
@deck.gl-community/panels.
Extend it for panel-managed UI that is not itself a panel container, such as a toolbar, toast stack, or application-specific standalone control.
Usage
import {PanelComponent, type PanelComponentProps} from '@deck.gl-community/panels';
class StatusComponent extends PanelComponent<PanelComponentProps> {
placement = 'top-right' as const;
className = 'status-component';
override onRenderHTML(rootElement: HTMLElement): void {
rootElement.textContent = 'Ready';
}
}
Props
type PanelComponentProps = {
id?: string;
style?: Partial<CSSStyleDeclaration>;
className?: string;
_container?: string | HTMLElement | null;
};
Lifecycle
PanelComponent owns the shared host lifecycle used by PanelManager and
PanelWidget: mounting, root element creation, prop updates, HTML rendering,
removal, placement, and optional deck redraw, viewport, hover, and pointer
hooks.
Remarks
Panel,PanelContainer,ToolbarComponent, andToastComponentextendPanelComponent.- Use
PanelManagerto mount components without deck.gl. - Use
PanelWidgetfrom@deck.gl-community/widgetsto adapt one component to deck.gl'swidgetsprop.