In the following sample code, the thumbnails are listed on the left side. The right side displays the current PDF document.
import { thumbnailPlugin } from '@react-pdf-viewer/thumbnail';
import '@react-pdf-viewer/core/lib/styles/index.css';
import '@react-pdf-viewer/thumbnail/lib/styles/index.css';
const thumbnailPluginInstance = thumbnailPlugin();
const { Thumbnails } = thumbnailPluginInstance;
<div
className="rpv-core__viewer"
style={{
border: '1px solid rgba(0, 0, 0, 0.3)',
display: 'flex',
height: '100%',
}}
>
<div
style={{
borderRight: '1px solid rgba(0, 0, 0, 0.3)',
overflow: 'auto',
width: '30%',
}}
>
<Thumbnails />
</div>
<div style={{ flex: 1 }}>
<Viewer fileUrl="/assets/pdf-open-parameters.pdf" plugins={[thumbnailPluginInstance]} />
</div>
</div>;