Sections
All-AccessNewCanvasArt handlers in Dakar: the services are wall text in an empty room; a line laser from the open row turns the corner and meets what that service leaves on the white wall
Use Datum for the services of a trade that works in rooms (installers, fitters, movers, galleries): the services are wall text, and a line laser from the open row turns the corner and meets what that service leaves on the other wall.
pnpm dlx shadcn@latest add @motionkit-pro/datumnpx shadcn@latest add @motionkit-pro/datumyarn dlx shadcn@latest add @motionkit-pro/datumbunx --bun shadcn@latest add @motionkit-pro/datumRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { Datum } from "@/components/sections/datum"
export default function Page() {
return (
<Datum
content={{
eyebrow: "Shop fitters · Lyon",
title: (
<>
Shelves that <em>stay level.</em>
</>
),
services: [
{
id: "hang",
name: "Hang",
line: "…",
detail: "…",
basis: "from €90 a wall",
object: "hang",
},
{
id: "crate",
name: "Move",
line: "…",
detail: "…",
basis: "from €240",
object: "crate",
},
],
cta: { label: "Book a visit", href: "/contact", note: "Free inside the city." },
}}
/>
)
}Every text sits in one typed content prop; each key you pass replaces the default copy (art
handlers in Dakar), so pass at least title, services and cta.
| Key | Type | Notes |
|---|---|---|
services | { id, name, line, detail, basis, object }[] | One wall-text row each; object is "hang" | "report" | "crate" | "wrap". |
eyebrow | ReactNode | Small caps line above the title. |
title | ReactNode | The heading (h2); <em> is set in italic. |
lede | ReactNode | One paragraph under the title. |
cta | { label, href, note? } | The one action, a strip of masking tape, with a pencilled note. |
list | string | Accessible name of the service tabs. |
panel | (index, total) => string | Position line over the open service. |
level | (mm: string) => string | The laser's height in that line. |
eye | (mm: string) => string | Eye-height note on the pencil drawing. |
nav takes your navigation, set as wall text above the copy. defaultValue and onValueChange
control the open service by id.
The demo photograph stays on this site and is not installed. The photograph only works with its
own measurements, so it is passed together with them through room:
| Prop | Type | Ratio | Transparent | Max weight | Notes |
|---|---|---|---|---|---|
room.image | string | any, 3:2 best | no | 500 KB | An empty room: one plain wall facing the camera on the left, one turning away on the right, floor visible. About 2000 px wide. |
room.geometry | WallGeometry | (of that picture) | n/a | n/a | size in px, corner (foot of the corner) and vanish (vanishing point) as fractions of the picture, eye height in metres, focal (0.75 = 35 mm). |
Both walls are repainted in wall and plaster from the photograph's light, and the laser, the
tripod and the objects are drawn in the room's perspective from geometry; a photograph with the
wrong numbers puts the line in the wrong place. Use WebP or JPEG on your own origin or with CORS
headers (the walls are read from the pixels). Without room, every variant shows the room as a
pencil set-out drawing on paper, the laser and objects included.
hang (default): copy on the wall colour, the objects' wall in plaster. Preview it with
?demo=default.plan: the room as a pencil set-out drawing on paper. Preview it with ?demo=plan.white: the walls swapped, copy in ink on plaster. Preview it with ?demo=white.Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. wall and plaster are
the two walls, vinyl the copy on the dark wall and ink on a light one, laser the line, unit
the laser's housing, metal the tripod, shade every shadow, plywood the crate, tape the
action, pencil the marks and the drawing, paper the plan variant, brass its pins. The
paintings and their wrapping keep their own colours, like the photograph.
<Datum
colors={{
wall: "#1d4fb8",
plaster: "#eef0f3",
vinyl: "#f5f1e4",
ink: "#1b2340",
laser: "#e0402c",
unit: "#f2cf3c",
plywood: "#d9bd8c",
tape: "#eee2bd",
pencil: "#4a4e57",
paper: "#efe2c8",
brass: "#c9a043",
metal: "#2c3036",
shade: "#1f2738",
}}
/>use-prefers-reduced-motion, fx-runtime, section-runtime.stack: copy and services first, the room as a band below them, the action last. On touch
screens the laser drifts slowly round the open row on its own; vertical scroll is never blocked.
The line stands still at the open row's level; choosing a service moves it there at once and its object fades in over 150 ms.
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 line stands still at the open row's level; choosing a service moves it there at once and its object fades in over 150 ms.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)