A TypeScript library for creating realistic page-flip animations in the browser.
# Vanilla JavaScript
npm install html-flip-book-vanilla
# React
npm install html-flip-book-react- RTL & LTR Support — Horizontal flip direction for both reading directions
- Touch & Mouse Input — Drag pages with touch gestures or mouse
- Velocity-based Flipping — Fast swipes complete the flip automatically
- Progress-based Flipping — Partial drags complete based on progress threshold
- Concurrent Flip Animations — Multiple pages can flip simultaneously
- Hover Effects — Subtle inner-shadow preview on page edges
- Leaves Buffer — Performance optimization for large books (only render nearby pages)
- Paper Fold State —
page--angled-backmarks the reflected face during an oblique fold, allowing consumers to scope content-layer styles to that state. Straight folds and resting pages clear the marker. - Bookmark Providers — Opt-in TOC and chapter tabs, or custom content, placement, ordering, and click actions. Tabs have front and back content, expand on hover, and fold with their leaf. See the bookmark guide.
- Toolbar Components — Pre-built navigation UI:
Toolbar— Container componentPrevButton/NextButton— Navigate pagesFirstPageButton/LastPageButton— Jump to endsPageIndicator— Current page displayFullscreenButton— Toggle fullscreen mode
- Imperative API —
flipNext(),flipPrev(),flipToPage(),jumpToPage() - Ref Handle — Access current page index, total pages, navigation state
- Live Demo — English (LTR), Hebrew (RTL) books, and a top-bound vertical spiral calendar
- Curl animation / animated page edges
- Vertical flip direction (
flipAxis: "vertical"— top-bound spiral calendar mode; see the Vertical → Spiral Calendar demo) - Vue component
- Angular component