🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@deck.gl-community/widgets

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deck.gl-community/widgets

UI widgets for deck.gl

npmnpm
Version
9.3.5
Version published
Maintainers
5
Created
Source

Overview

:::caution The deck.gl-community repository is semi-maintaned. One of its goals is to collect and preserve valuable deck.gl ecosystem related code that does not have a dedicated home. Some modules may no longer have dedicated maintainers. This means that there is sometimes no one who can respond quickly to issues. :::

NPM Version NPM Downloads deck.gl v9 WebGPU not supported

This module packages UI widgets that integrate with deck.gl view state management. It includes classic navigation widgets such as PanWidget and ZoomRangeWidget, HTML overlays, and deck-facing panel widgets for composing sidebars, modals, and info cards around a deck.gl canvas.

For renderer lifecycle management, the package also exports DeviceManager and DeviceTabsWidget. Together they let applications choose WebGPU or WebGL, reuse one cached luma device per backend, and reparent the managed canvas between host elements.

Panel definitions and standalone mounting live in @deck.gl-community/panels. Import panels from panels, then pass them to the deck-facing widgets in this package.

Installation

npm install @deck.gl-community/widgets

Usage

import DeckGL from '@deck.gl/react';
import {OrthographicView} from '@deck.gl/core';
import {PanWidget, ZoomRangeWidget} from '@deck.gl-community/widgets';

const widgets = [
  new PanWidget({placement: 'top-left', style: {margin: '16px'}}),
  new ZoomRangeWidget({placement: 'top-left', style: {margin: '96px 0 0 16px'}})
];

function App() {
  return (
    <DeckGL
      views={new OrthographicView({id: 'ortho'})}
      initialViewState={{target: [0, 0], zoom: 0}}
      controller={true}
      widgets={widgets}
      layers={[/* ... */]}
    />
  );
}

See the Pan and Zoom widgets example for a non-geospatial walkthrough.

See the Standalone Widgets example for deck-independent usage through @deck.gl-community/panels.

For the deck-facing panel widget APIs, see the Widget Panels example, which combines:

  • SidebarPanelWidget for persistent controls
  • ModalPanelWidget for tabbed secondary panels
  • BoxPanelWidget for static summary cards
  • reusable panel definitions imported from @deck.gl-community/panels

Use DeviceManager directly when your application wants custom backend-selection UI or needs to move the managed canvas between containers. Use DeviceTabsWidget when you want a ready-made widget for switching between webgpu and webgl2.

Standalone UI such as ToolbarWidget, ToastWidget, and toastManager is exported from @deck.gl-community/panels, not from this package.

Keywords

widgets

FAQs

Package last updated on 03 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts