FindSoftware

clipboard.js

JavaScript library that copies text to the clipboard when a user activates an element, with no Flash dependency.

clipboard.js copies text to the clipboard when a user clicks an element. The text can come from a data attribute, from the value or text of another element, or from a function that returns a string or a node. A cut action removes the text from an input or textarea instead. The library attaches one listener through event delegation and fires success and error events for the page to respond to. It includes no CSS or tooltip; the README suggests showing the feedback in the page.

Worth knowing

Copying depends on the Selection and execCommand browser APIs. The README says the library degrades for older browsers, where the page should tell the visitor to press the keyboard shortcut, because the text is already selected.

Identity

Status
Stub
Maintainer
Zeno Rocha3
Maintained by
Individual3
First release
20154

Rendering and deploy

Install with
npm5

Releases

Current major version
26
Last release
2022-05-046

Adoption

GitHub stars
34,0902
npm downloads a week
2,528,5957
Contributors
528
Dependent repositories
148,4429
Dependent packages
3,2929

Why these figures do not compare

Sources

  1. 2026-11-04: links
    clipboardjs.com/
  2. 2026-11-04: links, Written in, License, License model, GitHub stars
    api.github.com/repos/zenorocha/clipboard.js
  3. 2026-11-04: Maintainer, Maintained by
    github.com/zenorocha/clipboard.js/blob/master/LICENSE
  4. 2026-11-04: First release
    api.github.com/repos/zenorocha/clipboard.js/releases
  5. 2026-11-04: Install with
    github.com/zenorocha/clipboard.js/blob/master/readme.md
  6. 2026-11-04: Current major version, Last release
    api.github.com/repos/zenorocha/clipboard.js/releases/latest
  7. 2026-11-04: npm downloads a week
    api.npmjs.org/downloads/range/2026-10-26:2026-11-01/clipboard
  8. 2026-11-04: Contributors
    api.github.com/repos/zenorocha/clipboard.js/contributors
  9. 2026-11-04: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/clipboard

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON