Sections
SignatureNewCanvasAn FAQ over a night print of a photograph: a lamp's wedge reprints it in day inks over the open answer and follows the hand.
Use it for a short list of questions where the page has one strong photograph to carry the section.
pnpm dlx shadcn@latest add @motionkit-pro/landfallnpx shadcn@latest add @motionkit-pro/landfallyarn dlx shadcn@latest add @motionkit-pro/landfallbunx --bun shadcn@latest add @motionkit-pro/landfallRequires a Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { Landfall } from "@/components/sections/landfall"
export default function Page() {
return (
<Landfall
image="/images/coast.webp"
content={{
title: "Before you book",
items: [
{ id: "refunds", question: "Can I get a refund?", answer: "Yes, up to 14 days before." },
{ id: "pets", question: "Are pets allowed?", answer: "One dog per room, on a lead." },
],
}}
/>
)
}Every text sits in one typed content prop; each key you pass replaces the default copy (a
lighthouse stay), so pass at least title and items.
| Key | Type | Notes |
|---|---|---|
eyebrow | ReactNode | Mono line above the title. |
title | ReactNode | The heading (h2). |
lede | ReactNode | A short paragraph under the title. |
facts | { label: ReactNode; value: ReactNode }[] | Small mono facts under the lede (2 to 4 read best). |
caption | ReactNode | Line above the questions. |
items | { id: string; question: ReactNode; answer: ReactNode }[] | The questions; two or three lines per answer. |
closing | ReactNode | Line under the questions (a phone, a link). |
lightLabel | ReactNode | Tiny label beside the lantern. |
sweep (default): preview it with ?demo=default.occulting: preview it with ?demo=occulting.daymark: preview it with ?demo=daymark.The demo images stay on this site and are not installed: pass your own through the props below.
| Prop | Type | Ratio | Transparent | Max weight | Notes |
|---|---|---|---|---|---|
image | string | any, landscape reads best | no | 300 KB | Any photograph: it is reprinted in two duotones, so its own colours do not matter. Its bright parts become the light tones of each print. |
lantern={[x, y]} in image fractions (e.g. [0.35, 0.14] for a lamp
a third across and near the top). On wide screens the photograph slides so the lantern sits at
lanternAt of the width.Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. The night print runs
from a step below night to sea; the day print from rust through lamp to paper. paper is
also the text on the night print, ink the text on the day print, lamp the accent. Lightness is
clamped on both prints so the text keeps AA contrast with any colours.
<Landfall
image="/images/coast.webp"
colors={{
night: "#421800",
sea: "#926463",
rust: "#008a84",
lamp: "#5ad3ff",
paper: "#e3f1fb",
ink: "#320e00",
}}
/>use-prefers-reduced-motion, fx-runtime.reflow: the same content is redrawn for the narrow screen. Vertical scroll is never blocked.
A still frame with the wedge parked on the open answer; changes cross-fade the day layer in 0.3 s.
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.
—
A still frame with the wedge parked on the open answer; changes cross-fade the day layer in 0.3 s.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)