PDF viewing,
on your terms.

Lector is an open-source toolkit for building PDF experiences in React. Compose rendering, text selection, and annotations into a viewer that feels like part of your product.

React 19+ · TypeScript · Powered by PDF.js
Attention Is All You Need
Loading PDF

All the mechanics of a PDF viewer.
None of the decisions about your interface.

Compose your own viewer

Compose document state, virtualized pages, and rendering layers with your own React components.

Meet the primitives

Keep the document moving

Virtualized pages render as you read. Built-in panning and zooming keep large documents within reach.

Explore the controls

Go beyond the canvas

Add text selection, search, highlights, and annotations. Every layer works with the same document.

Explore the layers

A few primitives.
A working reader.

A document, its pages, and the layers you need. Familiar React composition, with the PDF state and rendering taken care of.

Read the documentation
reader.tsx
import {
  Root, Pages, Page,
  CanvasLayer, TextLayer,
} from "@anaralabs/lector";

export function Reader() {
  return (
    <Root source="/document.pdf" className="h-[600px]">
      <Pages>
        <Page>
          <CanvasLayer />
          <TextLayer />
        </Page>
      </Pages>
    </Root>
  );
}

Build the reader
your product deserves.