No.10 · Buttons
Neon Tube Button
A border made from a bent glass tube with its electrodes meeting underneath: unlit at rest, it strikes, stutters twice and holds when you point at it.
The prompt
Written for the variant you picked above: Pink
Build a pill button whose border is a neon tube, drawn in SVG from the button's measured size. The tube path starts just right of a 14px gap at the bottom centre, runs clockwise round the pill and ends just left of the gap; two small dark rounded caps sit either side of the gap as electrodes. Unlit, the tube is pale glass: a 4.5px translucent white stroke with a thin highlight just above it, and the label is dim. Lit, three strokes stack on the same path — a wide blurred bloom in the gas colour, the 4.5px gas stroke with a drop-shadow, and a 1.4px near-white core — and the label takes the gas colour with a two-layer text glow. Hover or focus lights it with a single 700ms strike animation (on, drop to 15%, back, drop to 25%, then hold at full) applied to both the tube and the label; it never flickers once lit. Pressing whitens the core. Gas colour is a prop. Reduced motion lights it without the flicker. Selected variant — Pink: color="#ff4fa3" (pink neon) on radial-gradient(70% 60% at 50% 45%, #1d1820, #0a080b 75%).
Notes
- Interaction
- Hover or focus to light the tube; press to act.
- Motion
- One 700ms strike sequence on light-up; fades out over 320ms.
- Accessibility
- A real button with a text label; the tube is decorative SVG. The lit label stays readable against the dark background. Reduced motion removes the flicker.
- Responsive
- The tube is rebuilt from the button's measured size, so any label fits.