Skip to content

Introduction

a vue wrapper for foliate-js - library for rendering e-books in the browser

Installation

sh
npm install vue-book-reader --save
sh
pnpm add vue-book-reader --save

Basic Usage

And in your vue-component...

Different Builds

ModuleFilename
UMD(for browsers)vue-book-reader.umd.js
ES Module(for bundlers)vue-book-reader.es.js

VueReader API

VueReader Attributes

NameDescriptionTypeDefault
urlbook url or Filestring/File
locationset / update location of the bookstring/number
titlethe title of the bookstring
showTocwhether to show the tocbooleantrue
BookView AttributesBookView attributes all can be used.-

VueReader Slots

NameDescription
titlebook title
BookView slotsBookView slots all can be used.

VueReader Exposes

NameDescription
BookView ExposesBookView exposes all can be used.

BookView API

BookView Attributes

NameDescriptionTypeDefault
urlbook url or Filestring/File
tocChangedget an array representing the table of contents of the bookfunction(href)

BookView Slots

NameDescription
loadingViewBookView loadingView
errorViewBookView errorView

BookView Exposes

NameDescriptionType
nextPagedisplay next pagefunction
prevPagedisplay previous pagefunction
setLocationSet the pagefunction(href)