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

    Interface FlipBookHandle

    Imperative handle exposed via ref for programmatic control of the FlipBook. Flipbook methods (flipNext, jumpToPage, etc.) are called internally by commands; consumers interact through commands (execute) and getters (ref).

    const ref = useRef<FlipBookHandle>(null);
    const page = ref.current?.getCurrentPageIndex();
    interface FlipBookHandle {
        flipNext: () => Promise<void>;
        flipPrev: () => Promise<void>;
        flipToPage: (pageIndex: number) => Promise<void>;
        getCurrentPageIndex: () => number;
        getDownloadConfig: () => any;
        getOf: () => string | number;
        getTocPageIndex: () => number;
        getTotalPages: () => number;
        isFirstPage: () => boolean;
        isLastPage: () => boolean;
        jumpToPage: (pageIndex: number) => void;
        toggleDebugBar?: () => void;
    }
    Index

    Properties

    flipNext: () => Promise<void>

    Animate flip to the next page

    flipPrev: () => Promise<void>

    Animate flip to the previous page

    flipToPage: (pageIndex: number) => Promise<void>

    Animate flip to a specific page index

    getCurrentPageIndex: () => number

    Get the current (leftmost visible) page index

    getDownloadConfig: () => any

    Get download configuration for the book. Undefined when no download is configured.

    getOf: () => string | number

    Get the "of" value for the indicator (e.g. total label). Defaults to total pages when not set.

    getTocPageIndex: () => number

    Get the configured table of contents page index.

    getTotalPages: () => number

    Get the total number of pages

    isFirstPage: () => boolean

    Check if currently at the first page

    isLastPage: () => boolean

    Check if currently at the last page

    jumpToPage: (pageIndex: number) => void

    Jump to a specific page instantly without animation

    toggleDebugBar?: () => void

    Toggle debug toolbar visibility (when debug mode is enabled). Bound to Ctrl+Alt+D by default.