{"repo":"gerhardsletten/react-reader","free":true,"listed":false,"github":"https://github.com/gerhardsletten/react-reader","clone":"git clone https://github.com/gerhardsletten/react-reader.git","description":"An ePub-reader for React, powered by Epub.js","language":"TypeScript","stars":901,"topics":["epub-reader","reader","react"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"React Reader - an easy way to embed a ePub into your webapp React Reader is a react-wrapper for epub.js - an iframe based epub-reader that can run in browser, cordova and other web-based enviroments. See demo Install npm i react-reader Usage At the minimum you will need to give ReactReader you will need this: - An url that points to the epub-file - location (in epub) and a locationChanged function to store the change in location - Set a height for the container This will render a reader like this: ReactReader props - title [string] - the title of the book, displayed above the reading-canvas - showToc [boolean] - whether to show the toc / toc-nav - readerStyles [object] - override the default styles - epubViewStyles [object] - override the default styles for inner EpubView - swipeable [boolean, default false] - enable swiping left/right with react-swipeable. Warning this will disable interacting with epub.js iframe content like selection ReactReader props passed to inner EpubView - url [string, required] - url to the epub-file, if its on another domain, remember to add cors for the file. Epubjs fetch this by a http-call, so it need to be public available. - loadingView [element] - if you want to customize the loadingView - location [string, number, null] - set / update location of the epub - locationChanged [func] - a function that receives the current location while user is reading. This function is called everytime the page changes, and also when it first renders. - tocChang","default_branch":null,"files":null,"tree":[],"storefront":"/r/gerhardsletten","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gerhardsletten/react-reader/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."}