Skip to content

Social media share buttons

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
Open in a new tab

Description

Placed at the end of an article, a project or a product page, this row offers four shares through the services’ official addresses (Facebook sharer, LinkedIn share-offsite, WhatsApp wa.me, mailto for email) and a “Copy link” button. No official widget or third-party script is loaded: no tracker, no cookie banner to add, the page stays light. The script takes the page address (data-bprs-url if you set it, otherwise the canonical tag, otherwise the current address) and the title (data-bprs-title, otherwise the page title). Without JavaScript the links still work and share the address written in the HTML; only the copy button, useless without a script, stays hidden. Copying switches the button to “Lien copié” with a check mark and announces it to screen readers; if the browser refuses, the link appears in an already selected field for manual copying. Each link has a full accessible name (“Partager sur LinkedIn (nouvel onglet)”), 44 px targets, visible focus outline, icons in the services’ colours with AA contrast in light and dark mode, rem sizes, transitions removed with prefers-reduced-motion. Replace https://forgefrance.fr/ and the demo title with your own.

Code

Loading the code…

The code of this component in

Archive contents

bouton-partage-reseaux-sociaux-html-tailwind.zip3 files · 6 Ko

  • index.html11 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • 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
  • A WhatsApp button pinned to the bottom of the screen that opens a welcome bubble with common topics and a pre-filled message, with no third-party widget.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component