Skip to main content

Panel Widgets

from v9.3

Panel widgets lets you use panels and components from the @deck.gl-community/panels module in deck.gl applications.

  • @deck.gl-community/panels provides a generic panel-based UI.
  • @deck.gl-community/widgets enables you to use those panel definitions through convenient deck.gl wrapper widgets.

Usage

Import panels from @deck.gl-community/panels. Pass those panel definitions to deck.gl widgets from @deck.gl-community/widgets.

Container widgets

These are the deck.gl widgets that consume WidgetPanel and WidgetContainer values:

WidgetPurpose
BoxPanelWidgetStatic panel content anchored in a deck.gl widget corner.
FullScreenPanelWidgetA large inset panel layout that occupies most of the viewport.
ModalPanelWidgetOn-demand panel content shown in a centered overlay.
SidebarPanelWidgetPersistent panel content attached to the left or right edge.

Panel definitions

Use @deck.gl-community/panels for panel composition:

Composition patterns

  • Use BoxPanelWidget for compact summaries or status cards.
  • Use SidebarPanelWidget for persistent controls or inspectors.
  • Use ModalPanelWidget when panel content should open on demand.
  • Use FullScreenPanelWidget when one panel layout should temporarily take over the viewport.
  • Build the panel content itself in @deck.gl-community/panels, then reuse the same definitions across multiple widget wrappers.

Renderer selection

When a surface needs to switch between WebGPU and WebGL while keeping a reusable luma device alive, use the widgets package's renderer-selection APIs:

  • DeviceManager owns shared backend state, cached devices, and canvas reparenting.
  • DeviceTabsWidget provides a deck.gl widget UI for switching the active backend.

This backend-selection layer is separate from panel composition, but it fits naturally beside panel widgets when an application needs both a control surface and a managed render device.