Thumbnails
Add a scrollable page-preview sidebar beside the document.
Thumbnails clones one Thumbnail template for every page. Each thumbnail navigates to its page on click or Enter. Both thumbnails and pages must share the same Root.
A sidebar layout
Complete installation and create pdf-setup.ts before using this example.
The sidebar scrolls independently. minWidth: 0 allows the main viewer to shrink when the sidebar takes space. Set a CSS width on Thumbnail; Lector owns the canvas's drawing dimensions.
Label individual pages
For specific labels and an active-page indicator, map thumbnails yourself inside a child of Root:
Keep a visible focus indicator in your app's styles. The built-in keyboard handler supports Enter; if your UI needs Space activation too, provide an onKeyDown handler that prevents the page scroll and activates the thumbnail.
Thumbnails creates a wrapper for every page; it is not the same virtualized list as Pages. Thumbnail canvas rendering is visibility-driven. For very large documents, measure the sidebar separately and consider mounting it only when opened.
Live example
Virtual thumbnails for long documents
For hundreds or thousands of pages, opt into a bounded list. Give Thumbnails
a bounded height and specify the fixed height of each row, including spacing:
The container owns scrolling and mounts only nearby rows. Ensure each child's
content fits itemHeight; margins, padding and spacing belong inside that row.
The default layout remains available by omitting virtualize.
With a thumbnail focused, Arrow Up/Down moves between pages, and Home/End moves
to the first/last page, mounting the target before focusing it. Enter opens the
focused page. Consumer keyboard handlers can call preventDefault() to override
the virtual list's navigation keys.