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
3.7M
Open issues
17
Bundle
~25 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
- 3.7M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 17 open issues on GitHub