Skip to content

No.36 · Buttons· New

Spectrum Ring Button

A dark graphite pill whose icon sits in a well circled by broken, iridescent light under a fixed flare, as if a prism ring were catching a lamp overhead; the colours turn slowly and quicken on hover.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Spectrum

Build a dark pill button (or link) with an iridescent ring round its icon (React + CSS, no libraries). Pill: height 5.5em (16px base), padding 0 2.4em 0 0.62em, gap 1.35em, a 0.42em translucent white bezel (border-box gradient 10% → 3%) round a graphite body (#262628 → #19191b), an inner top highlight and a deep drop shadow. The label ("Home") is white Inter 500 at 1.7em. Icon well (4.25em): a dark disc (3.55em, radial #3a3a3e → #1f1f22, hairline, soft inner light) holding a glossy silver house icon (2.5em) (a white-to-grey diagonal gradient fill, small drop shadow). Round it, the ring: a conic gradient through the ring colours (blue, white, amber, red, violet, sky, green, gold, pink), broken by short near-black gaps after every third colour, masked to a 0.33em band, saturated and lifted. A second conic, turning the other way at 0.45×, shades two arcs of the ring nearly black so the light pools in a few places; a blurred copy of the ring behind it makes a soft coloured glow. Over it, fine spectral striations: a repeating conic gradient of thin red, yellow, green and blue bands every 22°, screen-blended at 55%, turning the other way at 1.6×. On top, fixed at 12 o'clock, a flare: a white-hot ellipse fading to a warm colour with a soft warm halo bleeding outward. Motion: the ring's start angle (an @property angle on the button) turns 360° every 14s and every 4.5s on hover; the flare brightens and swells 12% on hover; press scales to 0.97. Focus-visible draws a white outline. Reduced motion stops the turning. Renders an <a> when given href, otherwise a <button>. Props: label, icon, ring (colours), flare, size, plus native props. Selected variant — Spectrum (spectrum): Ring colours blue #2f6bff, white, amber #ffb347, red #ff4d3d, violet #7a3cff, sky #2fb7ff, green #3dff9a, gold #ffe14d, pink #ff5f6d; flare #ffb066. 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 speeds the ring and brightens the flare; press scales the pill slightly. Works as a native link or button. Motion: Ring turns once per 14s (4.5s on hover) with striations counter-turning; flare eases over 0.4s; press 0.3s. Accessibility: A native link or button named by its label; the ring, striations and flare are aria-hidden and the icon is decorative. White on graphite is above 15:1. Visible focus outline. Reduced motion stops the turning. Responsive behavior: Sized in em from one font-size; at 16px it is about 15em wide, so it fits a phone. Pass a smaller size for dense nav rails. Touch: No hover on touch; the ring keeps turning slowly and the press still scales. 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 speeds the ring and brightens the flare; press scales the pill slightly. Works as a native link or button.
Motion
Ring turns once per 14s (4.5s on hover) with striations counter-turning; flare eases over 0.4s; press 0.3s.
Accessibility
A native link or button named by its label; the ring, striations and flare are aria-hidden and the icon is decorative. White on graphite is above 15:1. Visible focus outline. Reduced motion stops the turning.
Responsive
Sized in em from one font-size; at 16px it is about 15em wide, so it fits a phone. Pass a smaller size for dense nav rails.
On touch
No hover on touch; the ring keeps turning slowly and the press still scales.

Featured

442 components