Skip to content

No.356 · FAQ

Card Catalogue FAQ

Questions filed like a library card catalogue: pull a topic's drawer and its index cards rise out of it; lift a card to read the answer on its ruled face.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Oak

Build an FAQ for many questions sorted by topic, styled as a library card catalogue. The topics are drawer fronts in a wooden cabinet (a darker frame with 6px gaps; each front has a vertical grain made from repeating gradients, a brass label plate with the topic in serif small caps and its count in mono, and a brass half-ring handle). The fronts are a tablist; the chosen drawer is 'pulled': it moves 5px toward you, scales 2.5% and casts a shadow onto the cabinet. Under the cabinet, the drawer's inside: a dark tray with shadowed side walls. Its index cards stand in it as a stack of cream cards showing only their heading row — a red mono call number ('BIL 02') and the question in serif. Changing drawer re-mounts the cards so they rise out of the tray, staggered 55ms. Opening a card (button with aria-expanded) lifts it 3px with a deeper shadow, draws the red header rule under the question and reveals its face with a grid-rows transition: the answer is set on blue ruled lines whose spacing equals the line height, so the text sits on the rules like a typed card. One card is open at a time. Arrow keys move between drawers; #billing and #billing-2 deep-link to a drawer and a card. Selected variant — Oak (paper): theme="paper" (oak): light oak drawer fronts and cabinet on a warm paper page (#f3efe7). This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Choose a drawer (click or ←/→) to see its cards; open a card to read its answer. Deep links open a drawer and card. Motion: Drawer pull 420ms; cards rise 560ms staggered 55ms; card lift and face reveal 420–480ms. Accessibility: Drawers are tabs with roving tabindex controlling one tabpanel; cards are headings containing buttons with aria-expanded/aria-controls; closed faces are inert. The call numbers are decorative. Reduced motion removes the rise and lift. Responsive behavior: Drawers wrap to as many columns as fit (two under 480px); card headings stack the call number above the question. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Choose a drawer (click or ←/→) to see its cards; open a card to read its answer. Deep links open a drawer and card.
Motion
Drawer pull 420ms; cards rise 560ms staggered 55ms; card lift and face reveal 420–480ms.
Accessibility
Drawers are tabs with roving tabindex controlling one tabpanel; cards are headings containing buttons with aria-expanded/aria-controls; closed faces are inert. The call numbers are decorative. Reduced motion removes the rise and lift.
Responsive
Drawers wrap to as many columns as fit (two under 480px); card headings stack the call number above the question.