`attachment` plugin lists all attachments of a PDF document.npm install '@react-pdf-viewer/attachment';
`attachment` plugin is included in the default-layout pluginimport { attachmentPlugin } from '@react-pdf-viewer/attachment';// Import stylesimport '@react-pdf-viewer/attachment/lib/styles/index.css';
const attachmentPluginInstance = attachmentPlugin();
`attachmentPluginInstance` provides the following property:| Property | Type | Description | From |
|---|---|---|---|
`Attachments` | `ReactElement` | The component lists available attachments | 2.0.0 |
`attachment` plugin instance, and use the `<Attachments />` component to list all attachments.const { Attachments } = attachmentPluginInstance;<Viewer plugins={[attachmentPluginInstance]} />;