No.394 · Text Animations· New
Gradient Text
Real, selectable text filled with colour: an aurora that flows slowly through the letters, brushed metal with a narrow band of light passing over it, or muted letters with a pool of colour that follows the pointer.
The prompt
Written for the variant you picked above: Aurora
Build a component that fills text with colour, in the single effect selected below, that works inline (one word in a sentence) or as a whole headline. Use background-clip: text on transparent text, with box-decoration-break: clone so the fill carries across line breaks; keep it real text (selectable, with a readable selection colour). In forced-colours mode drop the fill and use CanvasText. Palette (light / dark): teal #0e9f8f / #2dd4bf, blue #2563eb / #60a5fa, violet #7c3aed / #a78bfa, pink #db2777 / #f472b6, orange #ea580c / #fb923c. Light stops are deep enough for large text on a near-white page; dark stops are brighter. Show it in a two-line headline (Inter about 84px, 650, -0.04em, 1.02 leading) under a small uppercase eyebrow and in one inline phrase of a paragraph, on a #fbfbfa panel above a #08090b panel. Selected variant — Aurora (aurora): Aurora: a 100° gradient through teal, blue, violet, pink, orange and back to teal, sized 300% wide and drifting its position from 0% to 100% and back over 14s (ease-in-out, alternate). Copy: 'Make the thing everyone remembers.' with the second half in colour. 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: Text stays selectable and copyable; nothing else responds unless the effect follows the pointer. Motion: Pure CSS where it can be; reduced motion or motion={false} leaves a still, legible gradient. Accessibility: It's ordinary text, so screen readers read it normally. Colours keep large-text contrast on their page; forced-colours mode falls back to the system text colour. Responsive behavior: Sizes come from the container width; the fill follows the text across line breaks. Touch: Touch shows the slow drift (or the still fill); nothing depends on a pointer. 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
- Text stays selectable and copyable; nothing else responds unless the effect follows the pointer.
- Motion
- Pure CSS where it can be; reduced motion or motion={false} leaves a still, legible gradient.
- Accessibility
- It's ordinary text, so screen readers read it normally. Colours keep large-text contrast on their page; forced-colours mode falls back to the system text colour.
- Responsive
- Sizes come from the container width; the fill follows the text across line breaks.
- On touch
- Touch shows the slow drift (or the still fill); nothing depends on a pointer.