Sections
All-AccessNewWebGLCanvasAn archive lab's figures painted on the fanned fore-edges of four bound volumes; the count-up is the fanning, a thumb presses the pages back to gilt
Use Fore Edge for three or four large figures of a publisher, archive, library or any business built on paper: each figure is a fore-edge painting on a closed book, and the thumb fans the leaves so the painting shifts.
pnpm dlx shadcn@latest add @motionkit-pro/fore-edgenpx shadcn@latest add @motionkit-pro/fore-edgeyarn dlx shadcn@latest add @motionkit-pro/fore-edgebunx --bun shadcn@latest add @motionkit-pro/fore-edgeRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { ForeEdge } from "@/components/sections/fore-edge"
export default function Figures() {
return (
<ForeEdge
content={{
eyebrow: "The press in figures",
title: (
<>
Ten years, <em>one press.</em>
</>
),
stats: [
{ value: 212, unit: "titles", label: "printed since 2016" },
{ value: 1840000, unit: "sheets", label: "through the press", compact: "1.8 M" },
{ value: 3, unit: "people", label: "at the press" },
],
}}
/>
)
}Every text sits in one typed content prop; each key you pass replaces the default copy (a
digitisation lab in Tallinn).
| Key | Type | Notes |
|---|---|---|
stats | { value, unit?, label, caption?, compact? }[] | Up to four, one per volume (single shows the first). compact is the short form on narrow screens; caption is read after the figure. |
title | ReactNode | The heading (h2); <em> is set in the numeral colour. |
eyebrow | ReactNode | Small line above the heading. |
lede | ReactNode | One paragraph beside the heading; null (default) hides it. |
locale sets the number formatting.
pile (default): four volumes lying in a pile. Preview it with ?demo=default.shelf: standing side by side, figures running up the edges (lying again below 640 px). Preview
it with ?demo=shelf.single: one thick volume, one figure at hero size. Preview it with ?demo=single.Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. table is the
background, ink the heading, gilt the burnished edge, page the painted ground (kept light
under the numerals), numeral and unit the painted figure, cloth the boards and the shadows,
slip the first wash of the painting.
<ForeEdge
colors={{
table: "#e3ebe6",
ink: "#1f2a44",
gilt: "#d6b25c",
page: "#f4ecd9",
numeral: "#d2452f",
unit: "#2c3570",
cloth: "#253f74",
slip: "#f7f6ec",
}}
/>use-prefers-reduced-motion, fx-runtime, fx-glsl, section-runtime.stack: the volumes lie one under the other with the short figure. On touch screens one slow
riffle runs on the next volume every 11 s and a tap sweeps the edge; vertical scroll is never
blocked.
The books lie closed with their fore-edge paintings fully shown; the thumb does not fan the leaves.
ogl loads the first time the books near the viewport; until then (and without WebGL) the CSS
edges with their figures stand in.pnpm size).Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Not measured yet · budget 16.0 kB gzip
Component and MotionKit helpers; excludes react, react-dom.
—
The books lie closed with their fore-edge paintings fully shown; the thumb does not fan the leaves.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)