`bookmark` plugin lists all outline bookmarks of a PDF document. Clicking a bookmark item will jump to its associate section.npm install '@react-pdf-viewer/bookmark';
`bookmark` plugin is included in the default-layout pluginimport { bookmarkPlugin } from '@react-pdf-viewer/bookmark';// Import stylesimport '@react-pdf-viewer/bookmark/lib/styles/index.css';
const bookmarkPluginInstance = bookmarkPlugin();
`bookmarkPluginInstance` provides the following property:| Property | Type | Description | From |
|---|---|---|---|
`Bookmarks` | `ReactElement` | The component lists outline bookmarks | 2.0.0 |
`bookmark` plugin instance, and use the `<Bookmarks />` component to list all bookmarks.const { Bookmarks } = bookmarkPluginInstance;<Viewer plugins={[bookmarkPluginInstance]} />;
`bookmark` plugin provides other properties as following:import { DownArrowIcon, RightArrowIcon } from '@react-pdf-viewer/bookmark';
| Property | Type | Description | From |
|---|---|---|---|
`DownArrowIcon` | `ReactElement` | The down arrow icon | 2.6.0 |
`RightArrowIcon` | `ReactElement` | The right arrow icon | 2.0.0 |
`RenderBookmarkItemProps` includes new `path` property that indicates the path from each bookmark item to the root`title` and `aria-label` attributes for link annotations without using the Bookmark plugin`Bookmark` component adds new `renderBookmarkItem` property`Bookmarks` component addes new `setBookmarkExpanded` property`FitH` or `FitBH` throws an exception