Sections
All-AccessNewCanvasA weekly letter about one Buenos Aires building: the form is the brass entry panel; past issues are name strips, your address is embossed on label tape, the bell push subscribes
Use Portero for a newsletter or waitlist signup with a short archive: the form is a building's entry panel, six past issues are the name strips beside the bell pushes, the address is embossed on label tape in the empty window and the bell push subscribes.
pnpm dlx shadcn@latest add @motionkit-pro/porteronpx shadcn@latest add @motionkit-pro/porteroyarn dlx shadcn@latest add @motionkit-pro/porterobunx --bun shadcn@latest add @motionkit-pro/porteroRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { Portero, Slant } from "@/components/sections/portero"
export default function Page() {
return (
<Portero
content={{
eyebrow: "The Stairwell · one letter a week",
title: (
<>
Ring once. <Slant>We write every Friday.</Slant>
</>
),
lede: "A letter about one building a week. Leave your address in the empty window.",
plateName: "Stairwell",
issues: [
{ number: "Nº 12", flat: "3B", title: "The caretaker's ledger", href: "/letters/12" },
{ number: "Nº 11", flat: "PB", title: "A lift from 1931", href: "/letters/11" },
],
}}
issueDay={5}
onSubscribe={(email, frequency) => subscribe(email, frequency)}
/>
)
}onSubscribe gets a valid address and the chosen frequency; reject the promise to show the
invalid note. isSubscribed is checked first and shows the taken note. issueDay (0 = Sunday),
issueTime, cutoffHours and locale set the date on the card that slips out after success.
Every text sits in one typed content prop; each key you pass replaces the default copy (a letter
about Buenos Aires buildings).
| Key | Type | Notes |
|---|---|---|
issues | { number, flat, title, href, hand? }[] | Past issues, newest first; six fit the plate. hand picks the strip style. |
eyebrow | ReactNode | Small caps line above the title. |
title | ReactNode | The heading (h2); wrap a phrase in <Slant> for the slanted roman. |
lede | ReactNode | The taped notice; a leading <b> is its typed heading. |
field | string | Engraved label of the email window. |
ring | string | Engraved on the submit push. |
frequency | string | Legend of the two frequency pushes. |
weekly | string | Weekly push; default "Every" plus the issue day. |
monthly | string | Monthly push; default "First ... only". |
consent | string | The line along the plate's foot. |
change | string | The loose end of the tape after success (edit the address). |
plateNumber | string | Street number engraved at the top. |
plateName | string | Name under the number and on the date card. |
issuesLabel | string | Screen-reader heading of the past issues. |
placeholder | string | Faint text on the blank tape. |
errors | Record<PorteroError, string> | Notes for empty, noAt, afterAt, noDot, invalid, taken. |
confirmTitle | string | Heading of the date card. |
confirm | (date, time, frequency) => string | Line of the date card. |
sentTo | (email) => string | Small line under it. |
brass (default): a brushed brass plate with screws and a speaker grille. Preview it with
?demo=default.enamel: a white enamel plate with cobalt lettering. Preview it with ?demo=enamel.slip: strips only, in a brass frame, two columns: a footer band. Preview it with ?demo=slip.Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. brass is the plate,
stucco the wall, tape the label tape, door the accents of the copy, ink the text and the
reflection, enamel and cobalt the enamel variant. The six name strips keep their own papers and
inks, as each tenant wrote their own.
<Portero
colors={{
brass: "#c9a043",
stucco: "#d8cbb8",
tape: "#1f4fb0",
door: "#1f5a44",
ink: "#2a2722",
enamel: "#f3f1ea",
cobalt: "#203f99",
}}
/>use-prefers-reduced-motion, fx-runtime, section-runtime.aria-describedby.stack: the copy first, then the plate with the email window on top and the strips below. On
touch screens a slow reflection drifts over the plate on its own; vertical scroll is never blocked.
The plate is painted once with a still reflection; the tape is cut, the push latches and the date card appears at once, without sliding.
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 plate is painted once with a still reflection; the tape is cut, the push latches and the date card appears at once, without sliding.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)