0
Star pdfcn on GitHub

Build the PDF viewer, don't install one

PDF viewer components that you can copy and paste into your apps. Built on embedpdf and shadcn/ui. Composable. Customizable. Open Source.

pnpm dlx shadcn@latest add pdfcn/viewer

See it running

The whole library assembled into one reader — a resizable sidebar switching between thumbnails, outline, and attachments, a full toolbar, search, and annotation, all on embedpdf's Worker and WASM engine. Every piece is a component you'll find in the Code tab, and yours to keep.

"use client";

import { PdfViewerApp } from "@/components/pdf-viewer-app";

Batteries included, source wide open

You own the code

Every component installs as source in your repo — plain TypeScript and Tailwind. Restyle it, strip it back, or fork it. Nothing hides behind a dependency.

Built on embedpdf

PDFium compiled to WASM, rendering off the main thread in a Web Worker. Real document fidelity, not a canvas approximation.

Composed from shadcn/ui

The bookmark sidebar is a ScrollArea of ghost Buttons. The chrome is primitives you already know, not a bespoke widget system.