Skip to content

Toolbar plugin

The toolbar plugin combines different parts provided by other plugins such as

Install

> npm install @sse-ui/pdf-toolbar;

OR

> yarn add @sse-ui/pdf-toolbar;

The toolbar plugin is included in the default-layout plugins

Usage

1. Import the plugin

javascript
import { toolbarPlugin } from "@sse-ui/pdf-toolbar";

// Import styles
import "@sse-ui/pdf-toolbar/lib/styles/index.css";

2. Create the plugin instance

javascript
const toolbarPluginInstance = toolbarPlugin(props?: ToolbarPluginProps);

See the Create a toolbar with more options example for more details about ToolbarPluginProps. The plugin instance toolbarPluginInstance provides the following property:

PROPERTYTYPEDESCRIPTIONFROM
ToolbarReactElementThe default toolbar1.0.0
fullScreenPluginInstanceFullScreenPluginThe instance of the Full Screen plugin1.0.0
getFilePluginInstanceGetFilePluginThe instance of the Get File plugin1.0.0
openPluginInstanceOpenPluginThe instance of the Open plugin1.0.0
pageNavigationPluginInstancePageNavigationPluginThe instance of the Page Navigation plugin1.0.0
printPluginInstancePrintPluginThe instance of the Print plugin1.0.0
propertiesPluginInstancePropertiesPluginThe instance of the Properties plugin1.0.0
renderDefaultToolbarFunctionRender a custom toolbar based on the default toolbar. See this example1.0.0
rotatePluginInstanceRotatePluginThe instance of the Rotate plugin1.0.0
scrollModePluginInstanceScrollModePluginThe instance of the Scroll Mode plugin1.0.0
searchPluginInstanceSearchPluginThe instance of the Search plugin1.0.0
selectionModePluginInstanceSelectionModePluginThe instance of the Selection Mode plugin1.0.0
themePluginInstanceThemePluginThe instance of the Theme plugin1.0.0
zoomPluginInstanceZoomPluginThe instance of the Zoom plugin1.0.0

3. Register the plugin

Register the toolbar plugin instance:

javascript
<Viewer plugins={[toolbarPluginInstance]} />

Properties

The toolbar plugin provides other useful property as following:

javascript
import { MoreIcon } from "@sse-ui/pdf-toolbar";
PROPERTYTYPEDESCRIPTIONFROM
MoreIconReactElementThe three vertical dots icon1.0.0

Released under the MIT License.