No.51 · Buttons· New
Pulse Button
Buttons that move only because something is happening: an on-air button whose dot beats and whose viewer count ticks, a button whose badge pings when new items arrive, and a call to action that breathes a slow glow.
The prompt
Written for the variant you picked above: Live
Build a pill button (46px tall, fully rounded, 1px hairline, Inter 500 at 15px) that carries one kind of pulse, the one selected below. Palette (light / dark): ink #111111 / #ededed, muted #6b6b6b / #a0a0a0, face #ffffff / #161616, hairline #e2e2e2 / #2c2c2c, red #e11d2e / #ff3b4b, gradient #4f46e5 → #9333ea / #6366f1 → #a855f7. Focus ring 2px #2563eb / #6ea8fe, 3px out. Press scales to 0.97. Show it on a #f6f6f5 panel and a #0a0a0a panel side by side. Selected variant — Live (live): Live: the pill starts with a red 34px 'LIVE' tag (white, 12px, 700, 0.08em tracking) holding a white 8px dot with two rings that expand to 3.2× and fade over 2s, a second ring 1s behind. Then a play icon and 'Watch live', then the viewer count after a hairline divider in muted tabular figures, compacted (2.4k, 12k, 1.4M) and ticking. Pressing toggles aria-pressed: the label reads 'Watching' and the play icon becomes three small red equaliser bars bouncing at different speeds. Hover tints the edge red with a soft red shadow. 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: A normal button. Its pulse never blocks it, and every number it shows is also in its accessible name. Motion: Each pulse is CSS: rings 2s, badge ping 1.2s × 3, glow 3.2s. Reduced motion stops all of them and leaves a still, readable button. Accessibility: Native buttons; counts are spelled out for screen readers ('2.4k watching', '3 unread'); a toggle uses aria-pressed; motion is decorative and stops under reduced motion. Responsive behavior: Buttons keep their size; the panels stack on narrow screens. Touch: Nothing relies on hover; hover only strengthens what's already there. 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
- A normal button. Its pulse never blocks it, and every number it shows is also in its accessible name.
- Motion
- Each pulse is CSS: rings 2s, badge ping 1.2s × 3, glow 3.2s. Reduced motion stops all of them and leaves a still, readable button.
- Accessibility
- Native buttons; counts are spelled out for screen readers ('2.4k watching', '3 unread'); a toggle uses aria-pressed; motion is decorative and stops under reduced motion.
- Responsive
- Buttons keep their size; the panels stack on narrow screens.
- On touch
- Nothing relies on hover; hover only strengthens what's already there.