HTML Flip Book - v0.0.0-alpha.36
    Preparing search index...

    Interface FlipBookProps

    Props for the FlipBook React component.

    interface FlipBookProps {
        className: string;
        coverAspectRatio?: { height: number; width: number };
        coverConfig?: CoverConfig;
        debug?: boolean;
        direction?: "rtl" | "ltr";
        downloadConfig?: any;
        enableDownload?: boolean;
        enableHistory?: boolean;
        fastDeltaThreshold?: number;
        handlers?: FlipBookHandlers;
        historyMapper?: any;
        initialTurnedLeaves?: number[];
        leafAspectRatio?: { height: number; width: number };
        leavesBuffer?: number;
        of?: string | number;
        pages: ReactNode[];
        pageSemantics?: any;
        pageShadow?: boolean;
        snapshotDuringFlip?: boolean;
        tocPageIndex?: number;
    }
    Index

    Properties

    className: string

    CSS class name for the flipbook container

    coverAspectRatio?: { height: number; width: number }

    Aspect ratio for cover boards (slightly larger than leaf). The delta between cover and leaf aspect ratios determines the visible frame. Default: { width: 2.15, height: 3.15 }

    coverConfig?: CoverConfig

    Configuration for cover pages (front and back covers).

    debug?: boolean

    Enable debug mode

    direction?: "rtl" | "ltr"

    Reading direction: 'ltr' (left-to-right) or 'rtl' (right-to-left)

    downloadConfig?: any

    Download configuration: entire book and page-range handlers plus filename hints. Toolbar's DownloadDropdown reads this from the flipbook ref.

    enableDownload?: boolean

    When false, download is disabled (getDownloadConfig returns undefined). When true or omitted, the provided downloadConfig is used; there is no default implementation. See base FlipBookOptions and issue #168.

    enableHistory?: boolean

    When false, history integration is disabled. When true or omitted, the provided historyMapper is used; there is no default implementation. See base FlipBookOptions and issue #168.

    fastDeltaThreshold?: number

    Velocity threshold (px/s) for fast swipe to complete flip. Default: 500

    handlers?: FlipBookHandlers

    Event handlers. Use this to pass callbacks (e.g. onPageFlipped) instead of top-level props.

    historyMapper?: any

    When set, syncs the flip-book with browser history: pushState on flip, restore page on back/forward. Default: undefined.

    initialTurnedLeaves?: number[]

    Indices of leaves that should start in the turned (flipped) state

    leafAspectRatio?: { height: number; width: number }

    Aspect ratio for inner pages (text block leaves). Default: { width: 2, height: 3 }

    leavesBuffer?: number

    Number of leaves to keep rendered before and after the current position. When set, only leaves within the buffer range are visible for performance. Default: undefined (all leaves are always rendered)

    of?: string | number

    Override for the "of" part of the page indicator (e.g. a gematria letter for the total, like "נ" for 50 in Hebrew books). Defaults to total pages count when not set.

    pages: ReactNode[]

    Array of React elements to render as pages

    pageSemantics?: any

    Define which pages are covers for special styling

    pageShadow?: boolean

    When false, disables the inner page shadow/highlight (e.g. to avoid flicker with multiple books). Default: true.

    snapshotDuringFlip?: boolean

    When true, uses aggressive containment on pages during flip animations so the browser can operate on a cached GPU texture rather than re-rendering content every frame. Reduces jank when flipping rapidly. Default: true.

    tocPageIndex?: number

    Table of contents page index (book-level). Populates the store used by goToToc command and TocButton. Default: 4.