Copy button with confirmation
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
Description
Each button copies the exact value expected (the IBAN without spaces, the address line by line), turns green with a check mark for two and a half seconds, and an aria-live region announces what was just copied, even on repeated clicks. If the browser denies clipboard access, the text is selected and a message gives the shortcut to use. Without JavaScript the buttons are hidden and a single tap selects the value. No dependency, about thirty lines of script, light and dark themes, 44 px targets and no animation with prefers-reduced-motion.
Code
Loading the code…
The code of this component in
Archive contents
bouton-copier-presse-papiers-html-tailwind.zip3 files · 5 Ko
- index.html13 Ko
- README.md3 Ko
- LICENSE.md1 Ko
Tags
Updated on December 2, 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

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

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

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