React Pdf
react-pdf
Display PDFs in your React app as easily as if they were images.
Utilities
pdf
pdf-viewer
react
react-pdf
Utilities
javascript
npm
frontend
open source
ui
Stars
11k
Weekly
5.6M
Open issues
19
Bundle
~15 kB
Installation
npm install react-pdfCode example
import { usePdf } from "react-pdf";
export function Example() {
const value = usePdf();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Wojciech Maj
- 5.6M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 19 open issues on GitHub