PHPackages                             huebs/zeroclipboard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. huebs/zeroclipboard

ActiveComponent[Utility &amp; Helpers](/categories/utility)

huebs/zeroclipboard
===================

The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.

2.1.6(11y ago)0124MITJavaScript

Since Oct 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/huebs/zeroclipboard)[ Packagist](https://packagist.org/packages/huebs/zeroclipboard)[ Docs](http://zeroclipboard.org/)[ RSS](/packages/huebs-zeroclipboard/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (31)Used By (0)

### WARNING

[](#warning)

**This `master` branch contains the `v2.x` codebase for ZeroClipboard! For the `v1.x` codebase, see the [`1.x-master`](https://github.com/zeroclipboard/zeroclipboard/tree/1.x-master) branch instead.**

ZeroClipboard
=============

[](#zeroclipboard)

[![GitHub Latest Release](https://camo.githubusercontent.com/66da19c69e925d7dc64f27781f0209e18795b2544b2a959d1540e1b72126ef68/68747470733a2f2f62616467652e667572792e696f2f67682f7a65726f636c6970626f6172642532467a65726f636c6970626f6172642e706e67)](https://github.com/zeroclipboard/zeroclipboard) [![Build Status](https://camo.githubusercontent.com/730672c6bb9535eaddbd6d364942c88a0c2a7112564e7f410bcf3d07f508a891/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7a65726f636c6970626f6172642f7a65726f636c6970626f6172642e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/zeroclipboard/zeroclipboard) [![Coverage Status](https://camo.githubusercontent.com/021ea8c3eadcaeffc38de75a77968753c10afc9a14470e5adb6b931e9282fe68/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7a65726f636c6970626f6172642f7a65726f636c6970626f6172642f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/zeroclipboard/zeroclipboard?branch=master) [![Dependency Status](https://camo.githubusercontent.com/89f4846366ebafdc11a08ee659b6dc54e8cce0594ae76526be2495bb9d0d86ff/68747470733a2f2f64617669642d646d2e6f72672f7a65726f636c6970626f6172642f7a65726f636c6970626f6172642e706e673f7468656d653d736869656c64732e696f)](https://david-dm.org/zeroclipboard/zeroclipboard) [![Dev Dependency Status](https://camo.githubusercontent.com/f79614e8e5233451b56bce113e8529131a2b778e5c4b71e2da6628fa42d43b29/68747470733a2f2f64617669642d646d2e6f72672f7a65726f636c6970626f6172642f7a65726f636c6970626f6172642f6465762d7374617475732e706e673f7468656d653d736869656c64732e696f)](https://david-dm.org/zeroclipboard/zeroclipboard#info=devDependencies)

The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible [Adobe Flash](http://en.wikipedia.org/wiki/Adobe_Flash) movie and a [JavaScript](http://en.wikipedia.org/wiki/JavaScript) interface. The "Zero" signifies that the library is invisible and the user interface is left entirely up to you.

This is achieved by automatically floating the invisible movie on top of a [DOM](http://en.wikipedia.org/wiki/Document_Object_Model) element of your choice. Standard mouse events are even propagated out to your DOM element, so you can still have rollover and mousedown effects.

Limitations
-----------

[](#limitations)

### User Interaction Required

[](#user-interaction-required)

Due to browser and Flash security restrictions, this clipboard injection can ***ONLY*** occur when the user clicks on the invisible Flash movie. A simulated `click` event from JavaScript will not suffice as this would enable [clipboard poisoning](http://www.computerworld.com/s/article/9117268/Adobe_patches_Flash_clickjacking_and_clipboard_poisoning_bugs).

### Other Limitations

[](#other-limitations)

For a complete list of limitations, see [docs/instructions.md#limitations](docs/instructions.md#limitations).

Simple Example
--------------

[](#simple-example)

```

    Copy to Clipboard

```

```
// main.js
var client = new ZeroClipboard( document.getElementById("copy-button") );

client.on( "ready", function( readyEvent ) {
  // alert( "ZeroClipboard SWF is ready!" );

  client.on( "aftercopy", function( event ) {
    // `this` === `client`
    // `event.target` === the element that was clicked
    event.target.style.display = "none";
    alert("Copied text to clipboard: " + event.data["text/plain"] );
  } );
} );
```

See [docs/instructions.md](docs/instructions.md) for more advanced options in using the library on your site. See [docs/api/ZeroClipboard.md](docs/api/ZeroClipboard.md) for the complete API documentation.

Here is a working [test page](http://zeroclipboard.org/#demo) where you can try out ZeroClipboard in your browser.

Testing ZeroClipboard Locally
-----------------------------

[](#testing-zeroclipboard-locally)

To test the page [demo page](http://zeroclipboard.org/#demo) locally, clone the [website repo](https://github.com/zeroclipboard/zeroclipboard.org).

Support
-------

[](#support)

This library is fully compatible with Flash Player 11.0.0 and above, which requires that the clipboard copy operation be initiated by a user click event inside the Flash movie. This is achieved by automatically floating the invisible movie on top of a [DOM](http://en.wikipedia.org/wiki/Document_Object_Model) element of your choice. Standard mouse events are even propagated out to your DOM element, so you can still have rollover and mousedown effects with just a *little* extra effort.

ZeroClipboard `v2.x` is expected to work in IE9+ and all of the evergreen browsers. Although support for IE7 &amp; IE8 was officially dropped in `v2.0.0`, it was actually still *technically* supported through `v2.0.2`.

Contributing
------------

[](#contributing)

see [CONTRIBUTING.md](CONTRIBUTING.md)

Releases
--------

[](#releases)

Starting with version [1.1.7](https://github.com/zeroclipboard/zeroclipboard/releases/tag/v1.1.7), ZeroClipboard uses [semantic versioning](http://semver.org/).

see [releases](https://github.com/zeroclipboard/zeroclipboard/releases)

Roadmap
-------

[](#roadmap)

see [roadmap.md](docs/roadmap.md)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 57.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Total

28

Last Release

4307d ago

Major Versions

1.3.5 → 2.0.0-beta.12014-04-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/b211192208478dd0849d8798eacba19687d263747c4279543b6d437e594eed06?d=identicon)[huebs](/maintainers/huebs)

---

Top Contributors

[![jonrohan](https://avatars.githubusercontent.com/u/54012?v=4)](https://github.com/jonrohan "jonrohan (345 commits)")[![JamesMGreene](https://avatars.githubusercontent.com/u/417751?v=4)](https://github.com/JamesMGreene "JamesMGreene (194 commits)")[![jrolfs](https://avatars.githubusercontent.com/u/288160?v=4)](https://github.com/jrolfs "jrolfs (8 commits)")[![huebs](https://avatars.githubusercontent.com/u/1166532?v=4)](https://github.com/huebs "huebs (7 commits)")[![TooTallNate](https://avatars.githubusercontent.com/u/71256?v=4)](https://github.com/TooTallNate "TooTallNate (6 commits)")[![rimian](https://avatars.githubusercontent.com/u/64749?v=4)](https://github.com/rimian "rimian (4 commits)")[![Stereobit](https://avatars.githubusercontent.com/u/150493?v=4)](https://github.com/Stereobit "Stereobit (3 commits)")[![lhecker](https://avatars.githubusercontent.com/u/2256941?v=4)](https://github.com/lhecker "lhecker (3 commits)")[![bowsersenior](https://avatars.githubusercontent.com/u/40264?v=4)](https://github.com/bowsersenior "bowsersenior (3 commits)")[![adamyonk](https://avatars.githubusercontent.com/u/33258?v=4)](https://github.com/adamyonk "adamyonk (2 commits)")[![afc163](https://avatars.githubusercontent.com/u/507615?v=4)](https://github.com/afc163 "afc163 (2 commits)")[![andyluss](https://avatars.githubusercontent.com/u/197572?v=4)](https://github.com/andyluss "andyluss (2 commits)")[![avlukanin](https://avatars.githubusercontent.com/u/1560148?v=4)](https://github.com/avlukanin "avlukanin (2 commits)")[![IonicaBizau](https://avatars.githubusercontent.com/u/2864371?v=4)](https://github.com/IonicaBizau "IonicaBizau (2 commits)")[![robotdan](https://avatars.githubusercontent.com/u/1148709?v=4)](https://github.com/robotdan "robotdan (2 commits)")[![alexstrat](https://avatars.githubusercontent.com/u/687961?v=4)](https://github.com/alexstrat "alexstrat (1 commits)")[![CMTegner](https://avatars.githubusercontent.com/u/820552?v=4)](https://github.com/CMTegner "CMTegner (1 commits)")[![bundyo](https://avatars.githubusercontent.com/u/98318?v=4)](https://github.com/bundyo "bundyo (1 commits)")[![josh](https://avatars.githubusercontent.com/u/137?v=4)](https://github.com/josh "josh (1 commits)")[![billgathen](https://avatars.githubusercontent.com/u/68129?v=4)](https://github.com/billgathen "billgathen (1 commits)")

---

Tags

copyflashclipboardcutpastezclipclipclippy

### Embed Badge

![Health badge](/badges/huebs-zeroclipboard/health.svg)

```
[![Health](https://phpackages.com/badges/huebs-zeroclipboard/health.svg)](https://phpackages.com/packages/huebs-zeroclipboard)
```

###  Alternatives

[myclabs/deep-copy

Create deep copies (clones) of your objects

8.9k849.8M169](/packages/myclabs-deep-copy)[plasticbrain/php-flash-messages

A modern take on PHP session-based flash messages

184229.6k8](/packages/plasticbrain-php-flash-messages)[coderello/laraflash

Advanced flash messages for Laravel.

15737.2k1](/packages/coderello-laraflash)[caffeinated/flash

Flash Messages for Laravel

4649.5k2](/packages/caffeinated-flash)[cartalyst/alerts

Alerts allows you to easily pass alert messages to your Laravel views.

3064.2k](/packages/cartalyst-alerts)[sabre/amf

SabreAMF is a Flash Remoting server and client for PHP

415.9k1](/packages/sabre-amf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
