Skip to content

BookOptions

BookOptions = object

Defined in: core/src/options.ts:79

readonly optional autoSize?: boolean

Defined in: core/src/options.ts:107

Size the container to the book (aspect ratio and max width).

true

readonly optional binding?: Binding

Defined in: core/src/options.ts:93

"left"

readonly optional click?: ClickMode

Defined in: core/src/options.ts:109

"edges"

readonly optional cover?: boolean

Defined in: core/src/options.ts:95

Show the first and last pages alone, as hard covers.

false

readonly optional drag?: boolean

Defined in: core/src/options.ts:111

Let the pointer drag a page’s edge. The fold follows the pointer’s travel: pulled straight in it furls the whole edge, pulled from a corner it folds across.

true

readonly optional easing?: (t) => number

Defined in: core/src/options.ts:101

Easing for the corner’s path, t in 0..1.

number

number

linear

readonly optional flipDuration?: number

Defined in: core/src/options.ts:99

Duration of a full flip in milliseconds. Shorter flips take proportionally less.

1000

readonly height: number

Defined in: core/src/options.ts:83

Base page height in CSS pixels.


readonly optional hover?: boolean

Defined in: core/src/options.ts:117

Show where a page can be taken hold of when the mouse hovers there: the edge furls, leaning toward the pointer, and in a single-page book the page that turns back uncurls a strip over the spine.

true

readonly optional ignoreDragOn?: string | false

Defined in: core/src/options.ts:123

Pointer events starting on an element matching this selector never start a flip. false turns this off.

"a, button, input, textarea, select, [data-opf-no-flip]"

readonly optional layout?: Layout

Defined in: core/src/options.ts:91

"auto"

readonly optional maxWidth?: number

Defined in: core/src/options.ts:89

Widest single page in stretch mode.

2000

readonly optional minWidth?: number

Defined in: core/src/options.ts:87

Narrowest single page in stretch mode. A container narrower than two of these across the spine goes portrait.

100

readonly optional pages?: Iterable<HTMLElement>

Defined in: core/src/options.ts:125

Page elements.

the container's children

readonly optional shadowOpacity?: number

Defined in: core/src/options.ts:105

0 hides shadows, 1 is full strength (the original’s look).

0.35

readonly optional shadows?: boolean

Defined in: core/src/options.ts:103

true

readonly optional size?: SizeMode

Defined in: core/src/options.ts:85

"fixed"

readonly optional startPage?: number

Defined in: core/src/options.ts:97

Zero-based page to open on.

0

readonly optional swipe?: boolean

Defined in: core/src/options.ts:113

Turn the page on a quick touch or pen swipe across the pages (horizontal for a left- or right-bound book, vertical otherwise), from anywhere on it.

true

readonly optional swipeDistance?: number

Defined in: core/src/options.ts:115

Minimum swipe travel in CSS pixels.

30

readonly width: number

Defined in: core/src/options.ts:81

Base page width in CSS pixels. With size: "stretch" only the width:height ratio matters.