{"repo":"altmshfkgudtjr/react-epub-viewer","free":true,"listed":false,"github":"https://github.com/altmshfkgudtjr/react-epub-viewer","clone":"git clone https://github.com/altmshfkgudtjr/react-epub-viewer.git","description":"Epub Viewer Component for React.js.","language":"TypeScript","stars":114,"topics":["react","epub","viewer","epub-viewer","epub-reader","hacktoberfest"],"license":"MIT","category":"ui-components","readme_excerpt":"React-Epub-Viewer React-Epub-Viewer is an Epub viewer for React.js powered by Epub.js v0.3. It works with React 17, 18, and 19, ships both ESM and CommonJS builds with bundled TypeScript types, and is compatible with Next.js (App Router). Requirements - React = 17 — tested against React 17, 18 and 19 - Node = 22 — required to build / develop the library Getting Started 📢 Online Demo 👉 You can check the Demo Code Features - Table of contents - Setting - Font - Font size - Line height - Viewer horizontal margin - Viewer vertical margin - Change viewer type - Scrolled-doc [ true / false ] - Spread [ true / false ] - Current Page Information - Current chapter name - Current page number - Total page number - Move page by arrow keys - Highlight (Using mouseup event) - Select highlight color Getting the Code Install library from NPM Import viewer component TypeScript — the ref exposes imperative methods. Type it with the exported ViewerRef : Next.js (App Router) — the package ships with a \"use client\" banner, so importing it from a Server Component is fine; just render it inside a Client Component (epubjs needs the browser DOM). You can find other parameters in Component Props. Component Props You can also see the exported types for React-Epub-Viewer here. EpubViewer Props - ref - [RefObject] Viewer Ref - url - [string] - Epub file path - epubFileOptions - [object] Epub file option (Epub.js BookOption) - epubOptions - [object] Epub viewer option (Epub.js RenditionOption) (set allo","default_branch":null,"files":null,"tree":[],"storefront":"/r/altmshfkgudtjr","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/altmshfkgudtjr/react-epub-viewer/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}