Skip to content

Quick contact buttons

Three buttons to call, message on WhatsApp or send an email, with ready-made tel:, wa.me and mailto: links. The simple contact block that customers of a tradesperson or small business expect.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

Each button shows its action and the contact detail it uses, which stays useful on a computer where the tel: link does nothing. The WhatsApp link opens a chat with a first message already written ("Bonjour, je souhaite un devis…"), and the email link fills in the subject "Demande de devis" and a body to complete (site address, work, availability). To adapt them: the number in international format in tel: (+33…), the number without + or leading 0 in wa.me (336…), and URL-encoded texts (encodeURIComponent). Since a computer without a mail client cannot open a mailto: link, a "Copy email address" button appears as soon as the clipboard is available. The three buttons stack on mobile and line up once the block is wider than 48 rem (container query, so it also works in a narrow column). Colours and radius are set through --bcr-* CSS variables, each with a light and a dark value.

Accessibility: real links in a list, whose full name ("Appeler 02 47 05 18 62") matches the visible text, 64 px touch targets, a 3 px focus outline and AA contrast measured in light and dark. The copy result is announced through a role="status" region. In forced-colors mode each button keeps a visible border. With prefers-reduced-motion, hover transitions are turned off. Without JavaScript the three links work and only the copy button stays hidden.

Code

Loading the code…

The code of this component in

Archive contents

bouton-appel-rapide-whatsapp-email-html-tailwind.zip3 files · 6 Ko

  • index.html7 Ko
  • README.md5 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 4, 2026.

Reviews

No reviews yet.

In the same spirit

  • A row of buttons to share the page on Facebook, LinkedIn, WhatsApp or by email, with a copy-link button and no third-party script.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Toggle heart buttons that count favourites, remember them between visits and announce them to screen readers.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A button that adds an event to Google Calendar, Outlook or any calendar through an .ics file, with no third-party service.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A button that copies an IBAN, a reference, an address or a promo code and confirms "Copied", on screen and to screen readers.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component