Sections
All-AccessNewCanvasEarthquake early warning (Bucharest): five voices on one record section, each quote as wide as the seconds of warning
Use S minus P for testimonials that share one event: an early-warning service, an incident, a launch day. The section is a seismograph record section: one trace per voice, stacked by distance from the source and aligned on the alert line, and each quote is as wide as the seconds of warning that person had.
pnpm dlx shadcn@latest add @motionkit-pro/s-minus-pnpx shadcn@latest add @motionkit-pro/s-minus-pyarn dlx shadcn@latest add @motionkit-pro/s-minus-pbunx --bun shadcn@latest add @motionkit-pro/s-minus-pRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { SMinusP } from "@/components/sections/s-minus-p"
export default function Page() {
return (
<SMinusP
content={{
title: "Two sites, one tremor.",
event: {
date: "4 Dec 2025",
origin: "11:42:51",
zone: "UTC",
magnitude: 5.4,
region: "North basin",
depthKm: 40,
alertAfter: 8,
},
voices: [
{
id: "north",
station: "NOR",
city: "North",
distanceKm: 40,
warning: 6,
name: "A. Person",
role: "site lead",
place: "North yard",
quote: "We had six seconds.",
},
],
record: "Acme net · record section",
}}
/>
)
}defaultIndex sets the voice open at first (the furthest by default). Fonts come from the CSS
variables --smp-serif, --smp-sans and --smp-mono.
Every text sits in one typed content prop; each key you pass replaces the default copy (an
earthquake early-warning service in Bucharest).
| Key | Type | Notes |
|---|---|---|
voices | { id, quote, quoteText?, name, role, place, station, city, distanceKm, warning, sp?, seed? }[] | One trace each, nearest first; warning is the seconds of warning. |
event | { date, origin, zone?, magnitude, region, depthKm, alertAfter } | The printed header and the alert line. |
title, lede | ReactNode | The heading block; title is the h2. |
action | { label, href } | The pencilled margin note. |
voiceOf, alert, live, liveHint, felt, seconds, list, record | string / function | Labels on the sheet and for screen readers. |
drum (default): a buff sheet with indigo ink. Preview it with ?demo=default.night-shift: an indigo sheet with cream ink, for dark pages. Preview it with
?demo=night-shift.Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. paper is the sheet, ink
the traces and type, alert the alert line, flag and dots, pencil the analyst's marks, rule the
hairlines; nightPaper and nightInk replace the sheet and ink in night-shift. Text tones are
derived from them to keep AA contrast.
<SMinusP
colors={{
paper: "#f1e8d2",
ink: "#2c2f7e",
alert: "#e0412b",
pencil: "#c99a45",
rule: "#8b97a8",
nightPaper: "#1d2050",
nightInk: "#efe7d3",
}}
/>use-prefers-reduced-motion, fx-runtime.stack: the heading, then the record section across the width with each quote flowing under its trace. On touch screens a tap on a trace opens its voice and a tap anywhere shakes the live lane; vertical scroll is never blocked.
The record section is printed whole and the live lane holds a quiet line; choosing a voice swaps the strip without the paper feed.
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 record section is printed whole and the live lane holds a quiet line; choosing a voice swaps the strip without the paper feed.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)