No.32 · Buttons
Gradient Bloom Button
A hairline of slowly turning gradient at rest; cross the edge and that gradient blooms into the button from the exact point you came in, with the label inverting precisely along the circle.
The prompt
Written for the variant you picked above: Night
Combine a turning gradient border with a direction-aware fill. Register --angle with @property and turn a conic gradient (frost, lilac, amber, mint on night; cobalt, violet, orange, green on paper) once every 7s. At rest the pill shows only a 1.5px band of it: a layer with the gradient as background, padding 1.5px, and a content-box mask composited with exclude. A full-size bloom layer holds the same gradient and a second copy of the label in ink, in an identical box. Clip it with clip-path: circle(0% at var(--ex) var(--ey)). On pointerenter, write the entry point as percentages to --ex/--ey and open to 140% (680ms expo-out); on pointerleave, move the point to the exit and close on an ease-in curve (520ms). The gradient keeps turning inside the bloom, and the label inverts exactly along the circle's edge. Focus blooms from the centre; touch blooms from the finger and fades after a moment. Selected variant — Night (night): Palette for this theme (Night): --gbb-face #141217; --gbb-grad conic-gradient(from var(--gbb-a) at 50% 50%, #b9cce4, #c8b9ea, #f0b37a, #7fd1a8, #b9cce4); --gbb-ink #efe8dc; --gbb-ink-on #141216. 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 "night". 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: Enter from any side and the gradient blooms from that point; leave and it drains toward the exit. Motion: Gradient turns every 7s; bloom 680ms expo-out, drain 520ms ease-in. Accessibility: A real button; the inverted label copy is aria-hidden. Focus shows the bloom and an outline. Reduced motion stops the turning and makes the bloom instant. Responsive behavior: Intrinsic width from its label, 10rem minimum. Touch: Blooms from your finger on press, then drains. 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
- Enter from any side and the gradient blooms from that point; leave and it drains toward the exit.
- Motion
- Gradient turns every 7s; bloom 680ms expo-out, drain 520ms ease-in.
- Accessibility
- A real button; the inverted label copy is aria-hidden. Focus shows the bloom and an outline. Reduced motion stops the turning and makes the bloom instant.
- Responsive
- Intrinsic width from its label, 10rem minimum.
- On touch
- Blooms from your finger on press, then drains.