https://github.com/agentcooper/react-pdf-highlighter
Set of React components for PDF annotation
https://github.com/agentcooper/react-pdf-highlighter
annotator highlighting pdf pdf-viewer react
Last synced: about 1 year ago
JSON representation
Set of React components for PDF annotation
- Host: GitHub
- URL: https://github.com/agentcooper/react-pdf-highlighter
- Owner: agentcooper
- License: mit
- Created: 2017-11-25T19:36:50.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-11-22T15:38:45.000Z (over 1 year ago)
- Last Synced: 2025-05-11T14:03:29.791Z (about 1 year ago)
- Topics: annotator, highlighting, pdf, pdf-viewer, react
- Language: TypeScript
- Homepage: https://agentcooper.github.io/react-pdf-highlighter/
- Size: 14.4 MB
- Stars: 1,233
- Watchers: 24
- Forks: 473
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pdf - agentcooper/react-pdf-highlighter - Set of React components for PDF annotation. (Readers and viewers)
README
☕️ [Buy me a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SC4D2NS8G2JJ8&source=url)

# react-pdf-highlighter
Set of React components for PDF annotation.
Features:
- Built on top of PDF.js
- Text and image highlights
- Popover text for highlights
- Scroll to highlights
## Importing CSS
The bundled CSS include the CSS for pdfjs.
```tsx
import "react-pdf-highlighter/dist/style.css";
```
## Example
See demo https://agentcooper.github.io/react-pdf-highlighter/.
To run the example app locally:
```bash
npm install
npm start
```
## Install
```bash
npm install react-pdf-highlighter
```
## How to use
See [`./example/src/App.tsx`](https://github.com/agentcooper/react-pdf-highlighter/blob/main/example/src/App.tsx) for the React component API example.