react-pageflip
Version:
Simple React.js wrapper for StPageFlip library, for creating realistic and beautiful page turning effect
38 lines (37 loc) • 1.61 kB
TypeScript
export interface FlipSetting {
/** Page number from which to start viewing */
startPage: number;
/** Whether the book will be stretched under the parent element or not */
size: 'fixed' | 'stretch';
width: number;
height: number;
minWidth: number;
maxWidth: number;
minHeight: number;
maxHeight: number;
/** Draw shadows or not when page flipping */
drawShadow: boolean;
/** Flipping animation time */
flippingTime: number;
/** Enable switching to portrait mode */
usePortrait: boolean;
/** Initial value to z-index */
startZIndex: number;
/** If this value is true, the parent element will be equal to the size of the book */
autoSize: boolean;
/** Shadow intensity (1: max intensity, 0: hidden shadows) */
maxShadowOpacity: number;
/** If this value is true, the first and the last pages will be marked as hard and will be shown in single page mode */
showCover: boolean;
/** Disable content scrolling when touching a book on mobile devices */
mobileScrollSupport: boolean;
/** Set the forward event of clicking on child elements (buttons, links) */
clickEventForward: boolean;
/** Using mouse and touch events to page flipping */
useMouseEvents: boolean;
swipeDistance: number;
/** if this value is true, fold the corners of the book when the mouse pointer is over them. */
showPageCorners: boolean;
/** if this value is true, flipping by clicking on the whole book will be locked. Only on corners */
disableFlipByClick: boolean;
}