Panel Widgets
Panel widgets lets you use panels and components from the
@deck.gl-community/panels module in deck.gl applications.
@deck.gl-community/panelsprovides a generic panel-based UI.@deck.gl-community/widgetsenables 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:
| Widget | Purpose |
|---|---|
| BoxPanelWidget | Static panel content anchored in a deck.gl widget corner. |
| FullScreenPanelWidget | A large inset panel layout that occupies most of the viewport. |
| ModalPanelWidget | On-demand panel content shown in a centered overlay. |
| SidebarPanelWidget | Persistent panel content attached to the left or right edge. |
Panel definitions
Use @deck.gl-community/panels for panel composition:
Composition patterns
- Use
BoxPanelWidgetfor compact summaries or status cards. - Use
SidebarPanelWidgetfor persistent controls or inspectors. - Use
ModalPanelWidgetwhen panel content should open on demand. - Use
FullScreenPanelWidgetwhen 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:
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.