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:
Drop document
Drop document

Install

npm install '@react-pdf-viewer/drop';

Usage

1. Import the plugin and styles
import { dropPlugin } from '@react-pdf-viewer/drop';
// Import styles
import '@react-pdf-viewer/drop/lib/styles/index.css';
2. Create the plugin instance
const dropPluginInstance = dropPlugin();
3. Register the plugin
Register the `drop` plugin instance.
<Viewer plugins={[dropPluginInstance]} />

See also

Changelog

v2.0.0
  • First release