Skip to content

About

Copy any text to the clipboard with a 'Copied!' confirmation. Zero dependencies.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Copy Button 📋

Copy any text to the clipboard with a 'Copied!' confirmation. Zero dependencies.

What it is

A minimal copy-to-clipboard button using the Clipboard API. On success it briefly shows 'Copied!' so the visitor gets feedback. No libraries, works in all modern browsers.

Usage

copyBtn.addEventListener("click", () => navigator.clipboard.writeText(text));

Notes

License

MIT — do whatever you want, attribution appreciated.

About

Copy any text to the clipboard with a 'Copied!' confirmation. Zero dependencies.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages