No.249 · AI & Chat
Cited Answer
An AI answer whose citations work both ways: point at a number and its source lifts out of the row above; point at a source and every sentence it supports is underlined.
The prompt
Written for the variant you picked above: Paper
Design an answer-engine result: a serif question, a 'Sources 4' label with a row of four small source cards (two-line title, favicon initial, domain, index number), then an 'Answer' label and the answer text as sentences, each ending in small pill citations. Make the link between claim and evidence physical and bidirectional. Hovering or focusing a citation pill fills it with the accent, lifts its source card 4px (with an accent ring and shadow) and dims the other cards to 55%. Hovering or focusing a source card does the reverse: every sentence it supports gets a thick highlighter underline that draws in from the left (background-size 0% → 100% on a 0.35em band, 460ms expo-out). Cards and sentences enter with gentle staggers. The palette is a calm off-white with a deep teal ink and accent, plus a night version. Four source columns become two below 34rem (container query). Selected variant — Paper (paper): Palette for this theme (Paper): --ca-accent #20808d; --ca-bg #fcfcf9; --ca-card #f3f3ee; --ca-ink #13343b; --ca-line rgb(19 52 59 / 0.1); --ca-muted #5f7479. Treat these as the root colour tokens, one value per role, and name them to suit your code. Select it with the theme option set to "paper". Keep every dimension, spacing value, state and motion from the brief unchanged, and keep text at 4.5:1 contrast or better on these surfaces. 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: Hover or focus a citation to find its source; hover or focus a source to see what it supports. Motion: Card lift 420ms; highlighter underline 460ms; entrance staggers of 60ms (cards) and 90ms (sentences). Accessibility: Citations are buttons labelled with their source title; sources are links; both respond to focus exactly as to hover. Reduced motion removes motion but keeps the highlighting. Responsive behavior: Container query drops the sources to two columns below 34rem. Touch: Tapping a citation focuses it, which lifts its source. 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
- Hover or focus a citation to find its source; hover or focus a source to see what it supports.
- Motion
- Card lift 420ms; highlighter underline 460ms; entrance staggers of 60ms (cards) and 90ms (sentences).
- Accessibility
- Citations are buttons labelled with their source title; sources are links; both respond to focus exactly as to hover. Reduced motion removes motion but keeps the highlighting.
- Responsive
- Container query drops the sources to two columns below 34rem.
- On touch
- Tapping a citation focuses it, which lifts its source.