Draft Folio
An open folio in theme ink whose leaves curl as you drag them, with a primary-tinted loupe you can slide across the page.
An open folio lying on the theme background, its photos washed to monochrome and its loupe, captions and paper drawn from the Modus tokens (--foreground, --primary, --card) so it follows light, dark and every palette. Drag a page and the leaf bends through a chain of 18 strips instead of pivoting flat, lit and shaded as it lifts. The book leans toward the cursor, zooms from the toolbar, riffles through every plate on first view, and carries a loupe you can pick up and drag across the paper. Each photo is washed onto a drawn spread, or pass your own spread artwork. It fills its positioned parent, waits until it is on screen to riffle, and skips the riffle, tilt and spring when the user prefers reduced motion.
Drag a leaf to turn it · Slide the loupe to read
Installation
CLI
npx @modus-ui/cli add draft-folioManual
- Copy the code from the component tab.
- Create a file at
components/ui/draft-folio.tsx. - Paste the code.
Usage
Images must allow cross-origin use (Unsplash does) so they can be drawn onto the spread. Set spread: true on a page whose src is already a 1760×1240 transparent image of an open folio with the paper between 5.1–94.9% across and 21.8–78.2% down; it is used as-is.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
pages | DraftFolioPage[] | Eight Unsplash photos of Singapore with titles/places | Plates: src, title, optional place and spread. |
startPage | number | 2 | Plate the book lands on after the opening riffle. |
intro | boolean | true | Riffle through the plates when first on screen. |
magnification | number | 1.8 | Magnification of the glass. |
hint | string | "Drag a leaf to turn it · Slide the loupe to read" | Hint shown under the toolbar until first interaction. |
paperColor | string | "hsl(var(--background))" | Desk colour behind the book. |
inkColor | string | "hsl(var(--foreground))" | Text, icon and handwriting colour. |
accentColor | string | "hsl(var(--primary))" | Loupe rim and active toggle colour. |
sheetColor | string | "hsl(var(--card))" | Colour of the drawn folio paper. |
Comments