Sections
All-AccessNewCanvasTwelve-seat counter in Lima; twelve glazed pieces on a cloth, a kitchen ticket under each
Use Family meal for the team of a small restaurant, kitchen or studio of twelve in three crews: the section is the staff table from straight above, each person eats from the piece they made, and a kitchen ticket with their name is tucked under it; the hand pulls the ticket out.
pnpm dlx shadcn@latest add @motionkit-pro/family-mealnpx shadcn@latest add @motionkit-pro/family-mealyarn dlx shadcn@latest add @motionkit-pro/family-mealbunx --bun shadcn@latest add @motionkit-pro/family-mealRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { FamilyMeal } from "@/components/sections/family-meal"
export default function Page() {
return (
<FamilyMeal
image={{ vessels: "/family-meal/vessels.webp", shadows: "/family-meal/shadows.webp" }}
content={{
title: (
<>
Twelve stools. <em>Twelve of us.</em>
</>
),
lede: "We eat at five, before service.",
groups: [
{ value: "kitchen", label: "Kitchen", glaze: "cobalt", mark: "K" },
{ value: "floor", label: "Floor", glaze: "vermilion", mark: "F" },
{ value: "bar", label: "Bar", glaze: "yolk", mark: "B" },
],
hiring: null,
}}
/>
)
}crew lists twelve people per crew in order (four each); each crew eats from the vessels of its
glaze. firstNumber is the first ticket number on the roll.
Every text sits in one typed content prop; each key you pass replaces the default copy (a
twelve-seat counter in Lima).
| Key | Type | Notes |
|---|---|---|
crew | { name, role, group, line, meal? }[] | Twelve people, four per crew; meal is written in the cook's hand. |
groups | { value, label, glaze, mark }[] | Three crews; glaze is cobalt, vermilion or yolk. |
title | ReactNode | The heading (h2); <em> is set in italic. |
lede | ReactNode | One paragraph under the title. |
hiring | { label?, text, href, cta, note? } | null | The thirteenth slip, under an empty seat; null hides it. |
filter | string | Accessible name of the crew filter. |
all, allMark | string | The "all" test tile and its incised mark. |
count | (shown, total, group) => string | The tally on the spike ticket. |
number | string | Ticket number prefix ("Nº"). |
The vessels are cut from one photograph, keyed at build time into two atlases; their positions
and sizes are fixed in family-meal-sprites.ts, so another photograph does not fit and the image is
not a free choice. Download the two atlases from this site
(vessels, shadows) and
serve them from your origin.
| Prop | Type | Ratio | Transparent | Max weight | Notes |
|---|---|---|---|---|---|
image.vessels | string | 1148:861 (atlas) | yes | 400 KB | The keyed vessels of the photograph. |
image.shadows | string | 1148:861 (atlas) | no | 100 KB | Their shadows, multiplied over the cloth. |
Without image, or if it fails to load, every vessel is a glazed disc in its crew's colour
(cobalt, vermilion, yolk) at the same place, and the tickets work the same way.
table (default): the photograph's scatter, the copy in its own white column. Preview it with
?demo=default.pass: the tickets hang on a rail above the vessels, as at the pass. Preview it with
?demo=pass.counter: a long counter band, the copy and the hiring slip above it. Preview it with
?demo=counter.Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. cloth is the table,
paper, ink, number and pencil the tickets, clay the bare "all" tile, cobalt, vermilion
and yolk the crews' tiles, dots and the discs without a photograph. The photographed vessels keep
their own glaze.
<FamilyMeal
colors={{
cloth: "#fbfaf6",
ink: "#1f2533",
paper: "#f4ecd9",
number: "#d0402c",
pencil: "#4a4e57",
clay: "#e0b79c",
cobalt: "#1f4fb0",
vermilion: "#e0402c",
yolk: "#f2cf3c",
}}
/>use-prefers-reduced-motion, fx-runtime, section-runtime.stack: the copy and filter first, then the vessels in two staggered columns, the hiring slip last.
On touch screens a tap on a name or a vessel pulls its ticket out; vertical scroll is never blocked.
Every ticket rests at its place under its vessel; opening one shows it at once, without the slide or the cloth rucking.
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.
—
Every ticket rests at its place under its vessel; opening one shows it at once, without the slide or the cloth rucking.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)