Skip to main content

FullscreenWidget

from v9.0

This widget enlarges deck.gl to fill the full screen. Click the widget to enter or exit full screen.

import {Deck} from '@deck.gl/core';
import {FullscreenWidget} from '@deck.gl/widgets';
import '@deck.gl/widgets/stylesheet.css';

new Deck({
widgets: [
new FullscreenWidget({placement: 'top-left'})
]
});

Constructor

import {FullscreenWidget, type FullscreenWidgetProps} from '@deck.gl/widgets';
new FullscreenWidget({} satisfies FullscreenWidgetProps);

Types

FullscreenWidgetProps

The FullscreenWidget accepts the generic WidgetProps and:

container (HTMLElement, optional)

  • Default: undefined

A compatible DOM element which should be made full screen. By default, the map container element will be made full screen.

enterLabel (string, optional)

  • Default: 'Enter Fullscreen'

Tooltip message displayed while hovering a mouse over the widget when out of fullscreen.

exitLabel (string, optional)

  • Default: 'Exit Fullscreen'

Tooltip message displayed while hovering a mouse over the widget when fullscreen.

Styles

Learn more about how to replace icons in the styling guide.

NameTypeDefault
--icon-fullscreen-enterSVG Data UrlMaterial Symbol Fullscreen
--icon-fullscreen-exitSVG Data UrlMaterial Symbol Fullscreen Exit

Source

modules/widgets/src/fullscreen-widget.tsx