Skip to content

No.42 · Buttons

Ember Button

A warm amber button with a soft gold glow, and ornaments that draw in: circuit traces that power on, or hand-sketched sparks.

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: Power trace

Design a warm, confident primary button for a dark interface. It's an amber (#e8a24a) rounded rectangle (6px radius, 44px tall, medium-weight label with -0.01em tracking) with a faint white inner highlight along its top edge. On hover it brightens to #f3b45f and gains a soft gold drop-glow beneath it; on press it sinks by exactly 1px. An optional arrow (↗) nudges 2px up and to the right on hover. All transitions are 200ms cubic-bezier(0.4,0,0.2,1). Ornaments, when used, play once when the button scrolls into view (IntersectionObserver, 40% visible); under reduced motion they appear in their final state. Selected variant — Power trace (trace): Power trace ornament (ornament="trace", size lg, "Open the console"): two right-angled circuit traces, one above-right and one below-left of the button, each ending in a small round pad. They draw themselves in 600ms (ease-out-expo, the second 90ms later) in a dim grey, then "power on": the line turns amber and the pad fills with a soft amber glow. 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 brightens and glows; press translates 1px down. Ornaments draw once when 40% of the button is visible. Motion: Button: 200ms colour/shadow/transform. Trace: 600ms stroke draw (+90ms for the second), power-on at 600/690ms with a 200ms fill + glow. Sparkle: 450ms stroke draw. Accessibility: Polymorphic: a real <button type="button"> by default, an <a> when href is set (external links get rel="noopener noreferrer"). Ornaments are aria-hidden SVGs. Visible amber focus outline with 3px offset. Responsive behavior: Ornamented buttons are width min(100%, 20.5rem) so the flourishes never overflow narrow screens; sparkles shrink from 32px to 28px below 640px. Touch: Nothing depends on hover — the ornament is scroll-triggered, so it plays the same on touch. 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 brightens and glows; press translates 1px down. Ornaments draw once when 40% of the button is visible.
Motion
Button: 200ms colour/shadow/transform. Trace: 600ms stroke draw (+90ms for the second), power-on at 600/690ms with a 200ms fill + glow. Sparkle: 450ms stroke draw.
Accessibility
Polymorphic: a real <button type="button"> by default, an <a> when href is set (external links get rel="noopener noreferrer"). Ornaments are aria-hidden SVGs. Visible amber focus outline with 3px offset.
Responsive
Ornamented buttons are width min(100%, 20.5rem) so the flourishes never overflow narrow screens; sparkles shrink from 32px to 28px below 640px.
On touch
Nothing depends on hover — the ornament is scroll-triggered, so it plays the same on touch.