Skip to content

doradsoft/html-flip-book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

219 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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)

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 APIflipNext(), flipPrev(), flipToPage(), jumpToPage()
  • Ref Handle — Access current page index, total pages, navigation state

Examples

  • Live Demo — English (LTR) and Hebrew (RTL) books

Roadmap

  • Curl animation / animated page edges
  • Vertical flip direction
  • Vue component
  • Angular component

Bugs

About

html flip book

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages