const pageNavigationPluginInstance = pageNavigationPlugin();
The `pageNavigationPlugin()`
function takes an optional `PageNavigationPluginProps`
parameter that consists of the following property:
(? denotes an optional property)
Property | Type | Description | From |
---|
`enableShortcuts` ? | `boolean` | Enable shortcuts | 3.5.0 |
The shortcuts are enabled by default. Users can use particular shortcuts to jump to the previous or next page:
Shortcut | Action |
---|
`Command` + `ArrowLeft` (on macOS) | Go to the previous clicked link annotation |
`Alt` + `ArrowLeft` (on Windows) | Go to the previous clicked link annotation |
`PageUp` or `Alt` + `ArrowUp` | Go to the previous page |
`PageDown` or `Alt` + `ArrowDown` | Go to the next page |
The plugin instance `pageNavigationPluginInstance`
provides the following properties:
Property | Type | Description | From |
---|
`CurrentPageInput` | `ReactElement` | Allow to jump to any page | 2.0.0 |
`CurrentPageLabel` | `ReactElement` | Display the current page number | 2.0.0 |
`GoToFirstPage` | `ReactElement` | Customizable button to jump to the first page | 2.0.0 |
`GoToFirstPageButton` | `ReactElement` | The button to jump to the first page | 2.0.0 |
`GoToFirstPageMenuItem` | `ReactElement` | The menu item to jump to the first page | 2.0.0 |
`GoToLastPage` | `ReactElement` | Customizable button to jump to the last page | 2.0.0 |
`GoToLastPageButton` | `ReactElement` | The button to jump to the last page | 2.0.0 |
`GoToLastPageMenuItem` | `ReactElement` | The menu item to jump to the last page | 2.0.0 |
`GoToNextPage` | `ReactElement` | Customizable button to jump to the next page | 2.0.0 |
`GoToNextPageButton` | `ReactElement` | The button to jump to the next page | 2.0.0 |
`GoToNextPageMenuItem` | `ReactElement` | The menu item to jump to the next page | 2.5.0 |
`GoToPreviousPage` | `ReactElement` | Customizable button to jump to the previous page | 2.0.0 |
`GoToPreviousPageButton` | `ReactElement` | The button to jump to the previous page | 2.0.0 |
`GoToPreviousPageMenuItem` | `ReactElement` | The menu item to jump to the previous page | 2.5.0 |
`NumberOfPages` | `ReactElement` | Display the total number of pages | 3.3.0 |
`jumpToNextPage` | `Function` | Jump to the next page | 3.11.0 |
`jumpToPage` | `Function` | Jump to given page | 2.4.0 |
`jumpToPreviousPage` | `Function` | Jump to the previous page | 3.11.0 |
See their usages in the examples below.