Skip to content

BookOptions

BookOptions = object

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

readonly optional autoSize?: boolean

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

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

true

readonly optional click?: ClickMode

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

"anywhere"

readonly optional cover?: boolean

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

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

false

readonly optional drag?: boolean

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

Let the pointer drag a corner.

true

readonly optional easing?: (t) => number

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

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

number

number

linear

readonly optional flipDuration?: number

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

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

1000

readonly height: number

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

Base page height in CSS pixels.


readonly optional hoverCorners?: boolean

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

Lift a corner when the mouse hovers over it.

true

readonly optional ignoreDragOn?: string | false

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

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:64

"auto"

readonly optional maxWidth?: number

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

Widest single page in stretch mode.

2000

readonly optional minWidth?: number

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

Narrowest single page in stretch mode; below twice this the book goes portrait.

100

readonly optional pages?: Iterable<HTMLElement>

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

Page elements.

the container's children

readonly optional shadowOpacity?: number

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

0 hides shadows, 1 is full strength.

1

readonly optional shadows?: boolean

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

true

readonly optional size?: SizeMode

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

"fixed"

readonly optional startPage?: number

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

Zero-based page to open on.

0

readonly optional swipe?: boolean

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

Turn the page on a quick horizontal swipe.

true

readonly optional swipeDistance?: number

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

Minimum swipe travel in CSS pixels.

30

readonly width: number

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

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