Sections
All-AccessNewWebGLCanvasA case study laid out as a hillside of small fields at noon: every block is a plot, the pictures are cut to their field's outline, and the pointer is a passing cloud's shadow.
Use it for one project told in full: title and facts, three short chapters (brief, approach, result), up to three figures, two pictures, credits and a link to the next project.
pnpm dlx shadcn@latest add @motionkit-pro/patchworknpx shadcn@latest add @motionkit-pro/patchworkyarn dlx shadcn@latest add @motionkit-pro/patchworkbunx --bun shadcn@latest add @motionkit-pro/patchworkRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { Patchwork } from "@/components/sections/patchwork"
export default function Page() {
return <Patchwork pictures={PICTURES} variant="hillside" />
}hillside (default): preview it with ?demo=default.terraces: preview it with ?demo=terraces.strip: preview it with ?demo=strip.The demo images stay on this site and are not installed: pass your own through the props below.
| Prop | Type | Ratio | Transparent | Max weight | Notes |
|---|---|---|---|---|---|
pictures[].src | string | any (cover crop) | no | 300 KB | Any photograph; it is cropped to the plot's outline (position sets the crop). Without src a letterpress label of the plot is drawn from label. |
Use WebP or JPEG (WebP or PNG for cut-outs); host the files on your own origin or send CORS headers.
Every text, button names included, lives in one typed content prop; keys you leave out keep the demo copy shown above.
<Patchwork pictures={PICTURES} content={{ title: "Your title" }} />Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH.
<Patchwork
pictures={PICTURES}
colors={{
flowering: "#70d7ff",
ploughed: "#00989a",
stubble: "#c7eaff",
vines: "#68559b",
rows: "#9e8337",
hedge: "#483258",
lane: "#e6f4fe",
shade: "#4c1f00",
ink: "#251a2d",
cream: "#eaf7ff",
}}
/>use-prefers-reduced-motion, fx-runtime, motion-presets, motion-kit, section-runtime, fx-glsl.stack: columns stack, text first. Vertical scroll is never blocked.
The hill at noon with the cloud's shadow parked over the top-right plots, half on the picture and half on a field; figures shown 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 hill at noon with the cloud's shadow parked over the top-right plots, half on the picture and half on a field; figures shown at once.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)