Thumbnails
Add a sidebar of page previews that shows where you are and jumps to any page.
Basics
thumbnails adds a sidebar with a small preview of every page; the current page is highlighted.
Thumbnails render lazily as they scroll into view, so a long document costs nothing until the user looks at it. Each thumbnail is a button labeled with its page number, and the sidebar is a named navigation region.
Customization
The sidebar width and the highlight color are CSS variables; the sidebar’s accessible name comes from labels.thumbnails.
See --rpv-thumbnails-width and --rpv-accent in the CSS variables reference and the customization guide.
Advanced / escape hatch
For a thumbnail strip in your own layout (for example horizontally under the page), use PdfPageCanvas with a small scale or fit box.
Limitations
- Hidden in compact layouts. Below
compactBreakpointthe sidebar is hidden outside fullscreen, because it would take too much of a narrow screen. Workaround: lowercompactBreakpoint, or build a horizontal strip withPdfPageCanvas. - Thumbnails stay rendered. A thumbnail is kept once it has been shown, so memory grows with the number of pages scrolled past. Workaround: a headless strip that renders only what is on screen.
- The sidebar is on the left. Its position is fixed. Workaround: a headless layout.
API
PdfViewerProps— Props for PdfViewer. Every piece of state supports the value / defaultValue / onChange trio.