Publira Comic Viewer

A composable, headless-UI React viewer for comics and manga. It provides the viewport, the spreads, and the page pipeline, and leaves the look of the reader to the application around it.

What it does

Install it

npm install @publira/comic-viewer

React 19 or later is required as a peer dependency. Compose ComicViewer.Root with the parts the reader needs:

import * as ComicViewer from "@publira/comic-viewer";import type { ViewerPage } from "@publira/comic-viewer";import "@publira/comic-viewer/default.css";const pages: ViewerPage[] = [  { id: "page-1", src: "/pages/1.jpg", title: "Page 1" },  { id: "page-2", src: "/pages/2.jpg", title: "Page 2" },];const Reader = () => (  <ComicViewer.Root initialReadingDirection="rtl" pages={pages}>    <ComicViewer.Viewport />    <ComicViewer.Toolbar />    <ComicViewer.PageNavigation />  </ComicViewer.Root>);

Everything else — theming, controlled navigation, double-page grouping, lazy page metadata, plugins — is written down once, in the usage reference.

See it running