Sections
All-AccessNewCanvasRelease notes of a joinery cutting-list app; the timeline is a lacquered birch folding rule, version = length
Use Folding Rule for the changelog of a product with semantic versions: the timeline is a lacquered birch folding rule and a version is a length (2.4.1 = 241 mm), so majors are the red decimetre figures, minors the centimetres, fixes the millimetres. The rule feeds through a brass index as the page scrolls; the previous major is the stick folded behind.
pnpm dlx shadcn@latest add @motionkit-pro/folding-rulenpx shadcn@latest add @motionkit-pro/folding-ruleyarn dlx shadcn@latest add @motionkit-pro/folding-rulebunx --bun shadcn@latest add @motionkit-pro/folding-ruleRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { FoldingRule } from "@/components/sections/folding-rule"
export default function Page() {
return (
<FoldingRule
lastSeenVersion="3.1.0"
content={{
eyebrow: "Changelog · Tally 3",
title: (
<>
Counted once. <em>Shipped.</em>
</>
),
lede: "Every version is a length.",
releases: [
{
version: "3.2.0",
date: "2026-10-01",
title: "Exports, finally.",
notes: [
{ kind: "new", text: "CSV and PDF exports." },
{ kind: "fixed", text: "Totals no longer round twice." },
],
},
],
older: null,
feed: { href: "/changelog.rss", stamp: "Tally · 3 m", label: "Every release by RSS" },
}}
/>
)
}lastSeenVersion ticks the releases up to it as read; permalinkBase is the base of the copied
"§" links; headingLevel (2 or 3) sets the level of each version heading.
Every text sits in one typed content prop; each key you pass replaces the default copy (a joinery
cutting-list app).
| Key | Type | Notes |
|---|---|---|
releases | { version, date, title?, notes }[] | The current major, newest first; notes are { kind, text, breaking? }. |
older | { label, releases } | null | The previous major, folded behind the rule; null leaves it out. |
eyebrow | ReactNode | Small line above the title. |
title | ReactNode | The heading (h2); <em> is set in italic, in figure. |
lede | ReactNode | One paragraph under the title. |
feed | { href, stamp, label } | null | The maker's stamp at the end, linked to the feed; null hides it. |
kindLabels | { all, new, better, fixed } | The kind filter and the note keywords. |
breaking | string | The keyword of a breaking change (red pencil). |
filterLabel | string | Accessible name of the kind filter. |
listLabel | string | Accessible name of the release list. |
ticket | { dated, ref, checked, read, unread } | Terms of each release's ticket. |
formatDate | (iso) => string | The date on the ticket (default "3 November 2026"). |
fold | { folded, unfold, count, region } | Texts of the folded stick, given its label or count. |
copy | { label, done } | The permalink button's name and the word shown once copied. |
rail (default): the rule stands down the left and feeds as the page scrolls. Preview it with
?demo=default.bench: it lies across the top as a scrubber, each release in two columns beneath. Preview it
with ?demo=bench.Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. lacquer is the rule,
figure the decimetre figures, breaking changes and the title's emphasis, birch the worn wood,
paper the ground, shadow every shadow, pencil the read ticks and kinds, ink the text and
graduation, brass the rivets and index.
<FoldingRule
colors={{
lacquer: "#f2cf3c",
figure: "#cf3b2a",
birch: "#e4cfae",
paper: "#e6eef6",
shadow: "#22408f",
pencil: "#3b4252",
ink: "#1b2030",
brass: "#c9a043",
}}
/>use-prefers-reduced-motion, fx-runtime, section-runtime.<time> dates; arrow
keys, Home and End move between them.stack: the rule lies across the top as a scrubber under the copy, the releases below. On touch
screens the rule follows the page scroll and a tap on a mark jumps to that release; vertical scroll
is never blocked.
The rule stands still at the release in view and jumps there with a short cross-fade as the page scrolls; the previous major swings out at once.
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 rule stands still at the release in view and jumps there with a short cross-fade as the page scrolls; the previous major swings out at once.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)