No.33 · 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
The design brief behind this component — reuse it to regenerate, remix, or explain it.
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.
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.