Sections
All-AccessNewWebGLTennis club footer drawn as the near half of a clay court from above; the pointer is a ball that arcs, bounces and marks the clay
Use Baseline as the footer of a club, venue or any place with opening hours, two groups of links and a newsletter: the court's painted lines are the layout, the pointer is a ball in flight.
pnpm dlx shadcn@latest add @motionkit-pro/baselinenpx shadcn@latest add @motionkit-pro/baselineyarn dlx shadcn@latest add @motionkit-pro/baselinebunx --bun shadcn@latest add @motionkit-pro/baselineRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { Baseline } from "@/components/sections/baseline"
export default function Footer() {
return (
<Baseline
courts={[{ number: 1 }, { number: 2, wateringUntil: "18:30" }]}
opening={{ open: "08:00", close: "21:00" }}
onSubscribe={async (email) => {
await fetch("/api/subscribe", { method: "POST", body: email })
}}
content={{
groups: [
{ title: "Play", links: [{ label: "Book a court", href: "/book", note: "to 21:00" }] },
{ title: "Club", links: [{ label: "Membership", href: "/join" }] },
],
leftAlley: "Via Roma 12 · Lucca",
rightAlley: "Courts 08:00 to 21:00",
legal: "© 2026 Your club",
legalLinks: [{ label: "Privacy", href: "/privacy" }],
}}
/>
)
}Every text sits in one typed content prop; each key you pass replaces the default copy (a
tennis club in Lucca).
| Key | Type | Notes |
|---|---|---|
groups | [{ title, links: { label, href, note? }[] }, …] | Two groups, one per service box; the status line sits in the first. |
newsletter | { title, body?, label?, placeholder?, button?, inMessage?, outMessage? } | The back court; inMessage / outMessage are { call, text } ("In.", "Out."). |
status | (s: BaselineStatus) => ReactNode | The status sentence from courts and opening. |
leftAlley | ReactNode | Along the left alley (address); null hides it. |
rightAlley | ReactNode | Along the right alley (hours); null hides it. |
legal | ReactNode | Legal line beyond the baseline. |
legalLinks | { label, href }[] | Links after the legal line. |
colophon | ReactNode | At the right of the legal line; null hides it. |
courts ({ number, wateringUntil? }[]) and opening ({ open, close }, local "HH:MM") feed the
live status line, computed after mount from the visitor's clock (now fixes it). onSubscribe
receives a valid address; a rejection turns the call to "out".
clay (default): terre battue with ball marks. Preview it with ?demo=default.grass: mown stripes, worn bare at the baseline, no marks. Preview it with ?demo=grass.floodlit: evening clay under four masts; the ball throws four shadows. Preview it with
?demo=floodlit.Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. Each variant has its own
palette; the colours you pass replace only those keys. clay is the dry court, wet the watered
clay under the copy (keep it dark enough for chalk text), chalk the lines and copy, ball the
ball and the button, shadow the net and ball shadow, ink the dark text on chalk and on the
button, grass the two mown greens and soil the bare earth (grass variant).
<Baseline
colors={{
clay: "#a85a37",
wet: "#9a5232",
chalk: "#f5f0e4",
ball: "#e3ea3f",
shadow: "#1e2d5c",
ink: "#3d1f12",
grass: ["#4f7f3a", "#41712f"],
soil: "#8a6b47",
}}
/>use-prefers-reduced-motion, fx-runtime, fx-glsl, section-runtime.stack: the boxes stack in one column, the alleys' text moves under the court. On touch screens a
slow rally plays on its own, one shot every 3.2 s; vertical scroll is never blocked.
One still court after an afternoon: three old marks, the ball at rest in empty clay; a serve shows its call at once.
ogl loads the first time the footer nears the viewport; until then (and without WebGL) the CSS
court with its chalk lines stands 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.
—
One still court after an afternoon: three old marks, the ball at rest in empty clay; a serve shows its call at once.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)