Toolbar plugin

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


npm install '@react-pdf-viewer/toolbar';
The toolbar plugin is included in the default-layout plugin


1. Import the plugin and styles
import { toolbarPlugin } from '@react-pdf-viewer/toolbar';
// Import styles
import '@react-pdf-viewer/toolbar/lib/styles/index.css';
2. Create the plugin instance
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:
ToolbarReactElementThe default toolbar2.0.0
fullScreenPluginInstanceFullScreenPluginThe instance of the Full Screen plugin2.4.0
getFilePluginInstanceGetFilePluginThe instance of the Get File plugin2.4.0
openPluginInstanceOpenPluginThe instance of the Open plugin2.4.0
pageNavigationPluginInstancePageNavigationPluginThe instance of the Page Navigation plugin2.4.0
printPluginInstancePrintPluginThe instance of the Print plugin2.4.0
propertiesPluginInstancePropertiesPluginThe instance of the Properties plugin2.4.0
rotatePluginInstanceRotatePluginThe instance of the Rotate plugin2.4.0
scrollModePluginInstanceScrollModePluginThe instance of the Scroll Mode plugin2.4.0
searchPluginInstanceSearchPluginThe instance of the Search plugin2.4.0
selectionModePluginInstanceSelectionModePluginThe instance of the Selection Mode plugin2.4.0
themePluginInstanceThemePluginThe instance of the Theme plugin2.6.0
zoomPluginInstanceZoomPluginThe instance of the Zoom plugin2.4.0
3. Register the plugin
Register the toolbar plugin instance:
<Viewer plugins={[toolbarPluginInstance]} />


The toolbar plugin provides other useful property as following:
import { MoreIcon } from '@react-pdf-viewer/toolbar';
MoreIconReactElementThe three vertical dots icon2.0.0

See also


  • The plugin instances which can be accessed from an instance of the Toolbar plugin should be readonly
  • Fix an issue that the plugin can cause a re-render
  • Remove duplicate borders of keyword input
  • Search results are not highlighted
  • The plugin doesn't include the drop plugin anymore
  • The toolbar Slot has new SwitchTheme and SwitchThemeMenuItem components
  • Provide the accesses to the instance of other plugins that build the toolbar
  • Fix the type definitions of the MoreActionsPopover component
  • First release