Toolbar
Place the toolbar above or below the page, choose its actions, and let it collapse into a “More actions” menu on narrow screens.
Basics
toolbar={{ position: 'top' }} moves the toolbar above the page; the default is below it.
The toolbar groups its controls into zoom, page navigation and actions. It is a single tab stop: Tab enters it and ← → Home End move between controls. toolbar={false} hides it.
Choosing actions
actions lists the controls to show. hiddenWhenCompact lists those hidden below compactBreakpoint (960px by default) outside fullscreen; by default that is rotate and print.
The order of controls within each group is fixed, so every toolbar reads the same way. The available actions are listed in the ToolbarAction reference.
Responsive overflow
The toolbar is always a single row. When it does not fit its container, the actions (fullscreen, rotate, download, print) move into a ⋮ More actions menu; on very narrow viewers the zoom controls follow. Page navigation always stays visible.
The menu follows the WAI-ARIA menu button pattern (Enter or ↓ opens it, arrows move, Esc closes it and returns focus) and opens away from the edge the toolbar sits on.
Customization
Colors, radius, spacing, button and icon sizes, and the menu surface are CSS variables.
All toolbar variables (--rpv-toolbar-*, --rpv-button-*, --rpv-menu-*) are listed in the CSS variables reference; see also the customization guide.
Advanced / escape hatch
To replace the toolbar with your own UI, or place parts of the default toolbar somewhere else, use renderToolbar with PdfToolbar.
Limitations
- Controls cannot be reordered within a group.
actionsselects controls but keeps their order. Workaround: build your own toolbar withrenderToolbar. - The compact layout follows the window width, not the container.
compactBreakpointcompares with the viewport, while the overflow menu reacts to the container. Workaround: setcompactBreakpoint={0}in narrow containers on wide screens and rely on the overflow menu. - No custom buttons in the default toolbar. Workaround: render
PdfToolbarnext to your own buttons insiderenderToolbar.
API
ToolbarConfig— Toolbar customization: where the toolbar sits, which controls it shows and in which order, and which it hides on narrow screens.ToolbarAction— Identifies a toolbar control, for choosing which controls the toolbar shows and in which order through ToolbarConfig.