Sections
All-AccessNewCrop engine for picture desks: two mount-board Ls on a print, the loose one pushed by hand, the chair always kept
Use Two Ells as the hero of an image, crop or media product. A print lies under two L-shaped cropping cards of mount board: the fixed L carries the nav and the copy, the loose L follows the hand, and whatever the crop the subject you name stays in the frame.
pnpm dlx shadcn@latest add @motionkit-pro/two-ellsnpx shadcn@latest add @motionkit-pro/two-ellsyarn dlx shadcn@latest add @motionkit-pro/two-ellsbunx --bun shadcn@latest add @motionkit-pro/two-ellsRequires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation.
The files land in components/sections/.
import { TwoElls } from "@/components/sections/two-ells"
export default function Page() {
return (
<TwoElls
image={{ src: "/hero/rooftops.webp", alt: "Rooftops from above, one red chair." }}
subject={{ x: 0.55, y: 0.49, label: "chair" }}
content={{
brand: "Acme",
nav: [
{ label: "Product", href: "/product", current: true },
{ label: "Docs", href: "/docs" },
],
headline: { lead: "Every crop", emphasis: "keeps the face." },
action: { label: "Try it", href: "/try" },
}}
/>
)
}subject is where the crop always keeps its eye, as fractions of the image (x, y from the
top left) and a name for the readout. ratios (2 to 5 of { label, value }) and defaultRatio
set the scale. displayFont, italicFont, bodyFont, monoFont and handFont take CSS font
stacks.
Every text sits in one typed content prop; each key you pass replaces the default copy (a crop
engine called Kadro).
| Key | Type | Notes |
|---|---|---|
brand, brandHref | string | Wordmark at the head of the nav strip, and where it links. |
nav | { label, href, current? }[] | Typed on the strip; a menu on phones. |
navLabel, menu | string | Name of the navigation, label of the phone menu button. |
headline | { lead: string; emphasis?: string } | The h1; emphasis is set in italic. |
lede, reassurance | string | Copy under the heading, pencil line under the action. |
action | { label, href } | The one primary action, ringed in grease pencil. |
ratioLegend, fullBleed | string | Legend of the ratio scale, slip of the contact variant. |
kept, cropAnnounce, ratioAnnounce | functions | Slip note and the polite screen-reader announcements. |
desk (default): two Ls, the loose one pushed by hand. Preview it with ?demo=default.proof: one board with a window per ratio, each its own crop. Preview it with ?demo=proof.contact: one L, the print bleeds off the edge. Preview it with ?demo=contact.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 | { src: string; alt: string } | any, landscape or square | no | 500 KB | Aerial or top-down photograph; the Ls crop it, so any subject reads. |
The print is drawn square and larger than the window, so a busy, textured picture with one clear
subject reads best; set subject on it. Use WebP or JPEG, at least 1400 px on the long side.
Prop
Type
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. board is the mount
board (its lights and bevels are derived from it), core the cut core on the bevels, pencil the
grease-pencil rings, text and graphite the copy, paper and ink the typed strips, shadow
the cards' cast shadow.
<TwoElls
image={IMAGE}
colors={{
board: "#232a38",
core: "#f5f4f0",
pencil: "#e0402f",
text: "#efede6",
graphite: "#b5bac2",
paper: "#f4f2ec",
ink: "#1c2230",
shadow: "#0d1220",
}}
/>use-prefers-reduced-motion, fx-runtime.h1, and the ratios as a labelled radio group (arrow keys).alt is read once.stack: the board opens a window under the heading, the copy follows below it and the nav folds
into a menu. On touch screens a drag moves the loose L and, left alone, it steps through the ratios
every twelve seconds; links and notches are at least 44 px and vertical scroll is never blocked.
The loose L rests on the chosen ratio and the pencil rings are drawn; choosing a ratio swaps the crop with a short fade.
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 loose L rests on the chosen ratio and the pencil rings are drawn; choosing a ratio swaps the crop with a short fade.
No keyboard interaction of its own.
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)