No.40 · Buttons
Double Rule Button
A button bordered like a certificate, with two hairline rules and fine engraving between them; on hover the inner rule moves out to close into one firm frame.
The prompt
Written for the variant you picked above: Ivory
Build a formal button for consequential actions ('Sign the agreement'), styled like a banknote or certificate: a theme-coloured face, a 1px outer rule, a 1px inner rule 5px inside it, and in the band between them a fine engraving of two crossed repeating-linear-gradients (±60°, 0.6px lines). Show the engraving only in the band, using a content-box mask composited with exclude. The label is set in Cinzel caps with wide tracking. On hover or focus, the inner rule's inset animates to 0 and thickens to 1.5px (520ms expo-out), meeting the outer rule so the frame closes into one firm line; the engraving fades, the tracking tightens slightly and a soft shadow in the rule colour appears — the document is sealed. Pressing nudges it down 1px. Selected variant — Ivory (paper): theme="paper" (ivory): ivory face #fbf8ef with banknote-green rules, engraving and label (#1f4d3a). 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 or focus to close the double rule into one frame; press to act. Motion: Inner rule and tracking move over 520ms expo-out; the engraving fades over 360ms. Accessibility: A real button with a text label and a strong outline on focus; the rules and engraving are decorative. Reduced motion makes the change instant. Responsive behavior: Intrinsic width from its label. 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 or focus to close the double rule into one frame; press to act.
- Motion
- Inner rule and tracking move over 520ms expo-out; the engraving fades over 360ms.
- Accessibility
- A real button with a text label and a strong outline on focus; the rules and engraving are decorative. Reduced motion makes the change instant.
- Responsive
- Intrinsic width from its label.