An FAQ set solid in huge type on a chalk sheet: the open answer is the leading between two lines, and a photograph lives inside it, one band per question.
Use it for a short FAQ that fills the first screen. The pointer height picks the open line and its x sets the gap; each question is a real button that locks open on click and opens on keyboard focus, over a band of your photograph.
When not to use
Not for long FAQs, documentation, settings lists or dense screens, since the questions are set huge and the sheet must fit them. For a long list of answers use a plain accordion.
Use it for a short help or FAQ section of a handful of questions, as the whole first screen of the page. Effects are visual
pieces rather than controls: they do not replace the Interface components in dashboards and forms.
import { Leading } from "@/components/effects/leading"export function Section() { return ( <Leading items={[ { q: "Which end is up?", a: "The pointed one." }, { q: "How deep?", a: "Three times the height of the bulb." }, ]} image="/effects/tulip-stripes.webp" className="h-96 w-full" preset="chalk" /> )}
The effect needs your image through its image prop (see the table below). Use a JPEG or WebP of at
least 1600 px on the long side, under 200 KB (400 KB at full screen); host it on your own origin or
send CORS headers, because the browser blocks cross-origin textures. The demo images stay on this
site and are not installed.
Each question is a real button with aria-expanded and aria-controls; closed answers are inert and hidden from assistive technology.
The effect never takes focus. On touch screens the questions open in turn once in view until a finger taps one, a horizontal drag moves the turn and each row is at least 44 px tall.
The hand does nothing and a click opens the answer in one step; on touch nothing opens by itself. The Leading hooks read usePrefersReducedMotion, so the MotionKitProvider setting applies too.
DOM only: per frame the line heights, gap heights and the photograph's background position are written, nothing re-renders; the loop stops off screen and in hidden tabs.
Source size is checked against the 15 KB gzip budget for effects (pnpm size).
Technical sheet
Motion
calm
260 ms · bounce 0
lively
400 ms · bounce 0.3
playful
540 ms · bounce 0.45
Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Size
Not measured yet · budget 15.0 kB gzip
Component and MotionKit helpers; excludes react, react-dom.
Dependencies
motion
Triggers
pointer movement, click, keyboard focus
Reduced motion
The hand does nothing and a click opens the answer in one step; on touch nothing opens by itself.
Keyboard
Tab / Enter / Space
Focus opens a question at 36 % of the height; Enter or Space locks it
Browsers
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)