Panel Widgets
Panel widgets let you use components from the
@deck.gl-community/panels module in deck.gl applications.
@deck.gl-community/panelsownsPanelComponent, panels, containers, toolbar, toast, and their rendering behavior.@deck.gl-community/widgetsadapts those components to deck.gl's widget lifecycle.
Usage
Import components from @deck.gl-community/panels.
Wrap any component in PanelWidget, or use one of the thin named adapters from
@deck.gl-community/widgets.
Adapter API
See PanelWidget for the generic adapter and the concise named-adapter list.
Panel definitions
Use @deck.gl-community/panels for panel composition:
Composition patterns
- Use
PanelWidgetwhen the application already has aPanelComponentinstance. - Use named adapters for concise construction of built-in panel containers, toolbar, or toast.
- Build panel content itself in
@deck.gl-community/panels, then reuse the same definitions across standalone and deck hosts.
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:
DeviceManagerowns shared backend state, cached devices, and canvas reparenting.DeviceTabsWidgetprovides 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.
Rendering a Deck scene in a panel
DeckPanel adds a canvas to an initialized shared Deck
using the 9.4 multi-canvas API. Callers supply the view, layers and controlled camera.
It composes with ordinary panels while keeping all deck.gl dependencies in widgets.
Use setDeckPropsWithPanels for root scene updates while panels are mounted.