No.46 · Buttons· New
Offset Press Button
A primary action printed in two layers: a pastel capsule sits just off its ink backing, then presses into perfect alignment.
The prompt
Written for the variant you picked above: Mint
Build a broad primary-action capsule as two flat printed layers. The native button is the dark ink backing; its inner face is pastel, with a thin ink outline and generous horizontal padding. At rest the face sits three pixels left and four pixels above the backing, leaving a crisp hard silhouette. Hover or visible keyboard focus separates it to four pixels left and six pixels up; an active press brings face and backing into alignment in 60ms, then releases over 180ms using an ease-out curve. Keep a minimum 52px face height and an outline-based focus ring outside the entire control, independent of the shadow. Disabled removes travel and lowers opacity. Forward native button attributes, children, onClick and explicit form type; default type is button. Support an optional full-width layout and no global shortcuts. Under reduced motion, remove transitions but retain immediate pressed, disabled and focus states. Keep the code self-contained with plain CSS. Selected variant — Mint (mint): Use accent="mint" for the pastel face. Keep the same two-layer geometry and native button interaction on the pale demo surface. 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: Native click, keyboard activation, form semantics and disabled state; demo toggles a local saved value. Motion: 180ms separation and release; 60ms press; reduced motion removes transitions. Accessibility: Semantic headings and native links/buttons, visible focus, decorative geometry hidden from assistive technology. Independent instances; honour reduced motion. Responsive behavior: Fluid layout and wrapping text at 320px through desktop. Page compositions stack intentionally on narrow screens; recovery links remain visible. Touch: Normal taps activate all actions. Pointer-only decoration is optional and fixed 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
- Native click, keyboard activation, form semantics and disabled state; demo toggles a local saved value.
- Motion
- 180ms separation and release; 60ms press; reduced motion removes transitions.
- Accessibility
- Semantic headings and native links/buttons, visible focus, decorative geometry hidden from assistive technology. Independent instances; honour reduced motion.
- Responsive
- Fluid layout and wrapping text at 320px through desktop. Page compositions stack intentionally on narrow screens; recovery links remain visible.
- On touch
- Normal taps activate all actions. Pointer-only decoration is optional and fixed on touch.