React-PDF

Display PDF documents in your React app as easily as if they were images

Library
npm
v10.4.1
11,148stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
87/100Excellent
Development Activity88
Maintenance92
Community68
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture84
Code Quality86
Innovation78
Learning Curve80

React-PDF wraps Mozilla’s PDF.js to let React applications render PDF documents as a set of composable components — Document, Page, Outline, and Thumbnail — rather than embedding a raw <iframe> or <embed>. It handles pagination, text selection, annotations, and password-protected files, and renders pages to canvas or SVG so PDFs behave like any other React-controlled visual element.

Maintained by Wojciech Maj, the library is organized as a Yarn workspace monorepo with a single published package and ships full TypeScript types. It’s a common building block for document viewers, e-signature flows, invoice/report previews, and any product that needs in-browser PDF rendering without relying on the browser’s built-in PDF plugin.

What You Get

  • Document and Page components that render individual PDF pages to canvas or SVG
  • Built-in text layer and annotation layer rendering for selectable text and clickable links
  • Outline and Thumbnail components for table-of-contents navigation and page previews
  • Password-protected document handling with a configurable password callback flow
  • Full TypeScript type definitions and tree-shakeable ESM output

Common Use Cases

  • Building in-app document viewers/previewers for invoices, contracts, or reports
  • Rendering PDFs inline in e-signature or document-review workflows without a browser plugin
  • Displaying paginated PDF thumbnails and outlines for multi-page document navigation
  • Embedding text-selectable, searchable PDF content directly in a React SPA

Under The Hood

Architecture - The package is a thin, component-oriented layer over Mozilla’s pdfjs-dist: Document loads and parses the PDF via a PDF.js worker (pdf.worker.entry.ts), exposing document/page state through React context (DocumentContext, PageContext) that child Page, Outline, and Thumbnail components consume to render canvas, SVG, text, and annotation layers independently. Tech Stack - A Yarn 4 workspaces monorepo (packages/react-pdf) written in TypeScript, built with tsc to ESM output, using Biome for linting/formatting and Vitest for unit tests, with pdfjs-dist as its core rendering dependency. Code Quality - Nearly every component ships alongside a co-located .spec.tsx/.spec.ts test file (Document, Page, Outline, Thumbnail, AnnotationLayer, StructTree, etc.), combined with strict TypeScript and Biome lint/format gates run in the test script before publish. API Design - The compositional API (<Document file={...}><Page pageNumber={1} /></Document>) mirrors familiar React patterns and keeps common cases low-boilerplate, while advanced needs (custom loaders, password prompts, worker configuration) are handled through well-documented props and context rather than escape hatches.

Used by 20 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
TypeScript
89%
Other

anytype-ts

Knowledge Management · Note Taking · Collaboration

8,665

A local-first, end-to-end encrypted knowledge OS that lets you build notes, tasks, wikis, and entire apps — with your data stored offline and synced peer-to-peer.

View details
88
Repo Health
78
Technical
67
Dependency
Built with
TypeScript89%
Updated yesterday
TypeScript
88%
MIT

DevTools-X

Developer Tools

1,532

41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.

View details
51
Repo Health
68
Technical
68
Dependency
Built with
TypeScript88%
Updated 2 months ago
Go
61%
Apache 2.0

Harness Open Source

Developer Tools · Devops · Code Editors

38,017

A unified open source DevOps platform combining Git hosting, CI/CD pipelines, cloud development environments, and artifact registries in a single self-hosted system.

View details
89
Repo Health
79
Technical
65
Dependency
Built with
Go61%
TypeScript34%
Updated 2 days ago
TypeScript
100%
Apache 2.0

ILLA Builder

Developer Tools · Low Code Platforms · No Code Platforms

12,311

Open-source low-code platform for building internal tools with drag-and-drop UI, reactive data bindings, and real-time collaboration.

View details
58
Repo Health
71
Technical
65
Dependency
Built with
TypeScript100%
Updated 2 months ago
TypeScript
69%
Apache 2.0

Laminar

AI Development · Monitoring

3,180

Open-source observability platform purpose-built for AI agents — trace, evaluate, debug, and monitor at scale with SQL access and real-time replay.

View details
85
Repo Health
76
Technical
70
Dependency
Built with
TypeScript69%
Rust29%
Updated yesterday
Python
68%
MIT

Langflow

AI Agents · AI Development

153,450

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

View details
90
Repo Health
85
Technical
66
Dependency
Built with
Python68%
TypeScript22%
Updated today
TypeScript
99%
Other

LobeHub

AI Assistants · Productivity · Automation

81,816

Your Chief Agent Operator — build, schedule, and collaborate with an entire AI team in one self-hostable workspace.

View details
92
Repo Health
81
Technical
72
Dependency
Built with
TypeScript99%
Updated today
JavaScript
57%
Other

Lokus

Note Taking · Knowledge Management

774

Local-first note-taking with graph view, canvas & AI plugins—your Markdown files, zero telemetry, blazing-fast Rust performance.

View details
78
Repo Health
75
Technical
65
Dependency
Built with
JavaScript57%
HTML24%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search