Drop plugin
The `drop`
plugin allows to open a PDF document by dragging and dropping it on the viewer container element.
It adds an element on top of the container element indicating that you can drag the document:
Install
npm install '@react-pdf-viewer/drop';
Usage
1. Import the plugin and styles
import { dropPlugin } from '@react-pdf-viewer/drop';
import '@react-pdf-viewer/drop/lib/styles/index.css';
2. Create the plugin instance
const dropPluginInstance = dropPlugin();
Register the `drop`
plugin instance.
<Viewer plugins={[dropPluginInstance]} />
See also
Changelog