Skip to Content
Kokonut UI

CD-11CardsNew, October 21, 2026

Page Flip

A book you turn by the corner. Drag a page over the spine or tap to turn it.

Install with
motion

PROOnboarding Checklist and more like it are in Kokonut UI Pro

Installation

Page Flip is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/page-flip.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/page-flip

Or add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/page-flip.tsx.

npm install motion

Usage

import PageFlip from "@/components/kokonutui/page-flip";

export default function Example() {
  return <PageFlip />;
}

Props

pages
ReactNode[]Default built-in

Pages in reading order. The first is the cover, alone on the right.

onSpreadChange
(spread: number) => void

Called with the spread index after a page settles.

className
string

Extra classes for the root element.

Dependencies

NeedsVersionComes from
motion^12.23.25npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.