No.243 · AI & Chat
Aura Field
A writing field where colour only exists while the AI is touching your text: the edge becomes a turning band of light and the words are rewritten in place, one by one, out of a soft blur.
The prompt
Written for the variant you picked above: Light
Build an AI writing field in a clean, system-UI style (white or near-black surface, 20px radius, SF-like sans, neutral chips). At rest the field has only a hairline edge. Below it sit tool chips — Proofread, Friendlier, Concise — and an undo button. Running a tool turns the edge into light: the frame is a 1.5px padded wrapper whose background becomes a conic gradient (orange → pink → violet → blue → teal → yellow) rotating via a registered @property --af-angle (3.2s linear), plus a blurred copy of the same gradient behind it as a soft outer bloom (55% opacity). The textarea goes quiet for 700ms while the aura turns, then the new text is streamed in place word by word (38ms apart), each word resolving from blur(6px) with a small iridescent dot as the caret. When finished the aura fades back to the hairline and the text becomes editable again. Undo restores the previous draft. The colour is never decorative at rest — it means 'the AI is working here'. Light and dark themes. Selected variant — Light (light): Palette for this theme (Light): --af-bg #ffffff; --af-chip rgb(0 0 0 / 0.05); --af-ink #1c1c1e; --af-line rgb(0 0 0 / 0.1); --af-muted #6e6e73. 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 "light". 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: Type or edit the draft; choose a tool to rewrite it; undo to go back. Motion: Conic band rotates 3.2s while busy and fades 600ms in/out; words resolve from blur over 420ms, 38ms apart. Accessibility: Labelled textarea (disabled while rewriting), a toolbar of real buttons, polite announcements for 'Rewriting…' and 'Rewrite applied'. Reduced motion stops the rotation and word animation; text is applied instantly. Responsive behavior: Fluid up to 34rem; tool chips wrap. Touch: Nothing depends on hover. 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
- Type or edit the draft; choose a tool to rewrite it; undo to go back.
- Motion
- Conic band rotates 3.2s while busy and fades 600ms in/out; words resolve from blur over 420ms, 38ms apart.
- Accessibility
- Labelled textarea (disabled while rewriting), a toolbar of real buttons, polite announcements for 'Rewriting…' and 'Rewrite applied'. Reduced motion stops the rotation and word animation; text is applied instantly.
- Responsive
- Fluid up to 34rem; tool chips wrap.
- On touch
- Nothing depends on hover.