const fullScreenPluginInstance = fullScreenPlugin(props?: FullScreenPluginProps);
The `fullScreenPlugin()`
function takes a `FullScreenPluginProps`
parameter that consists of the following properties:
(? denotes an optional property)
Property | Type | Description | From |
---|
`enableShortcuts` ? | `boolean` | Enable shortcuts | 2.9.0 |
`getFullScreenTarget?` | `Function` | Indicate the custom full screen element. See this example | 3.0.0 |
`onEnterFullScreen?` | `Zoom => void` | Triggered after entering the full screen mode | 2.3.1 |
`onExitFullScreen?` | `Zoom => void` | Triggered after exiting the full screen mode | 2.3.1 |
`renderExitFullScreenButton?` | `Function` | Render a custom button to exit the full screen mode. See this example | 3.0.0 |
By default, the shortcuts are enabled. Users can press `ctrl`
+ `cmd`
+ `F`
(on macOS) or `F11`
(on other operating systems) to enter the full screen mode.
`Zoom`
is the type defined as
import { SpecialZoomLevel } from '@react-pdf-viewer/core';
type Zoom = (scale: number | SpecialZoomLevel) => void;
The plugin instance `fullScreenPluginInstance`
provides the following properties:
Property | Type | Description | From |
---|
`EnterFullScreen` | `ReactElement` | Customizable full screen button | 2.0.0 |
`EnterFullScreenButton` | `ReactElement` | The default full screen button | 2.0.0 |
`EnterFullScreenMenuItem` | `ReactElement` | The default full screen menu item | 2.5.0 |