Skip to content

About

html flip book

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

383 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML Flip Book

CI CD Codecov Codacy Grade Documentation

npm vanilla npm react

A TypeScript library for creating realistic page-flip animations in the browser.

📖 Live Demo · 📚 API Docs

Installation

# Vanilla JavaScript
npm install html-flip-book-vanilla

# React
npm install html-flip-book-react

Features

Core

  • 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-back marks 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.

React Component

  • Toolbar Components — Pre-built navigation UI:
    • Toolbar — Container component
    • PrevButton / NextButton — Navigate pages
    • FirstPageButton / LastPageButton — Jump to ends
    • PageIndicator — Current page display
    • FullscreenButton — Toggle fullscreen mode
  • Imperative API — flipNext(), flipPrev(), flipToPage(), jumpToPage()
  • Ref Handle — Access current page index, total pages, navigation state

Examples

  • Live Demo — English (LTR), Hebrew (RTL) books, and a top-bound vertical spiral calendar

Roadmap

  • 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

Bugs

About

html flip book

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages