npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gfazioli/mantine-book

v1.0.4

Published

Realistic iBooks-style book component for React built with Mantine. Stack two-sided pages and turn them by dragging any point of the free edge in any direction, or through controlled page navigation — a pure-DOM reflection fold (flat) or a true 3D WebGL c

Readme

Mantine Book Component

NPM version NPM Downloads NPM Downloads NPM License


 ❤️ If this component has been useful to you or your team, please consider becoming a sponsor 

Overview

This component is created on top of the Mantine library. It requires Mantine 9.x and React 19.

Mantine Book renders a realistic iBooks-style book. Book stacks two-sided pages — each a <Book.Page> with <Book.Page.Front> and <Book.Page.Back> — that you turn by dragging any point of the free edge in any direction, or programmatically through the controlled page state. It offers two rendering paths: a pure-DOM flat reflection fold (the default, interactive at rest and SSR-safe) and a true 3D rounded WebGL curl with a lit specular ridge. Any JSX goes inside a face — text, images, MDX, even a canvas.

Features

  • 📖 Multi-page book: stack any number of two-sided pages; drag the right half to turn forward, the left half to turn back — the page beneath shows through the curl
  • 🎯 Compound API: <Book><Book.Page><Book.Page.Front>…</Book.Page.Front><Book.Page.Back>…</Book.Page.Back></Book.Page></Book> — or the data-driven pages={[{ front, back }]} form
  • 🧭 Controlled navigation: page / defaultPage / onPageChange with face-based indices — drive the book from arrows, pagination or keyboard; programmatic turns animate like a drag
  • 🧬 Inherited props: visual and gesture props set on the Book cascade to every page via optional context, and any page can override them locally
  • 📄 Physical page curl: grab any point of the free edge and drag in any direction — a perpendicular-bisector reflection fold, the generalization of a corner page-turn
  • 🧊 Two variants: flat (pure DOM + CSS, the universal fallback) and rounded (a true 3D curl on a WebGL canvas, with a soft specular ridge and a curlRadius control)
  • 🖱️ Drag, swipe, release: PointerEvents unify mouse and touch; a release settles open or back to rest past flipThreshold; mobileScrollSupport keeps page scroll working
  • Quiescent at rest: no perpetual requestAnimationFrame — rAF runs only during a drag or the release settle
  • 🛟 Graceful fallback: rounded falls back to flat automatically when WebGL is unavailable or a face snapshot fails — always safe to opt in
  • 🧩 React-owned content: faces are rendered once by React (no innerHTML cloning), so event handlers inside a face stay alive
  • 📦 Lazy WebGL: the rounded renderer and its snapshot dependency load only when a rounded curl mounts — flat users pay nothing
  • 🎨 Mantine-native theming: MantineColor for shadows, CSS-var dimensions, full Styles API
  • 📦 TypeScript: complete type safety with exported prop interfaces

[!note]

Demo and DocumentationMore Mantine Components

Installation

npm install @gfazioli/mantine-book

or

yarn add @gfazioli/mantine-book

After installation import package styles at the root of your application:

import '@gfazioli/mantine-book/styles.css';

Usage

import { Book } from '@gfazioli/mantine-book';

function Demo() {
  return (
    <Book width={300} height={420} variant="rounded">
      <Book.Page>
        <Book.Page.Front>Page 1</Book.Page.Front>
        <Book.Page.Back>Page 2</Book.Page.Back>
      </Book.Page>
      <Book.Page>
        <Book.Page.Front>Page 3</Book.Page.Front>
        <Book.Page.Back>Page 4</Book.Page.Back>
      </Book.Page>
    </Book>
  );
}

Sponsor

 ❤️ If this component has been useful to you or your team, please consider becoming a sponsor 

Your support helps me:

  • Keep the project actively maintained with timely bug fixes and security updates
  • Add new features, improve performance, and refine the developer experience
  • Expand test coverage and documentation for smoother adoption
  • Ensure long‑term sustainability without relying on ad hoc free time
  • Prioritize community requests and roadmap items that matter most

Open source thrives when those who benefit can give back—even a small monthly contribution makes a real difference.

💚 Become a sponsor today.


Star History Chart