You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
957 B

[![Latest Stable Version](https://img.shields.io/npm/v/react-epub-viewer.svg?style=for-the-badge)](https://www.npmjs.com/package/react-epub-viewer) [![License](https://img.shields.io/badge/license-mit-red.svg?style=for-the-badge)](https://www.npmjs.com/package/react-epub-viewer)
4 years ago
# react-epub-viewer
Epub Viewer for React.js powered by [Epub.js](https://github.com/futurepress/epub.js/)
View [Demo Page](https://altmshfkgudtjr.github.io/react-epub-viewer/).
## EpubViewer
If you put ref as an argument, the module will register the viewer as an `iframe` in the ref. Also, there are some functions written in the ref by default.
- [x] **`handleKeyPress`** Function
- [x] **`onLocationChange`** Function
- [x] **`selectionChanged`** Function
## ReactViewer
- [x] **`onTocChange`** Event
- [x] **`onBookInfoChange`** Event
- [x] **`onPageChange`** Event
- [x] **`onSelection`** Event
- Fire with `mouseup` event
- [x] Custom Loading Component