A tiny (<1kB) JavaScript library for copying text to the clipboard using the browser's native API.
copee is a lightweight JavaScript library that enables copying text to the clipboard using the browser's native API. It solves the common frontend problem of implementing clipboard functionality without relying on outdated hacks or heavy dependencies. The library is designed to be simple, reliable, and extremely small in size.
Frontend developers building web applications that require clipboard copy functionality, especially those prioritizing minimal bundle size and cross-browser compatibility.
Developers choose copee for its near-zero footprint, straightforward API, and reliance on native browser capabilities, making it a modern replacement for clipboard hacks and Flash-based solutions.
📄 Copy text from browser to clipboard...natively! < 1kB
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Weighs less than 1 kB gzipped, as shown in the README's badges, ensuring minimal impact on bundle size and performance.
Compatible with IE 11+ and modern browsers via UMD or ESM builds, providing reliable coverage for legacy and current systems.
Offers a single toClipboard(text) function that returns a boolean, making it straightforward to add copy functionality without complex setup.
A standalone library with no external dependencies, reducing maintenance overhead and avoiding version conflicts.
Uses document.execCommand('copy'), which is deprecated in some contexts and may not be supported long-term compared to the modern Clipboard API.
Only copies text to the clipboard; lacks support for reading data, handling rich text, or other advanced clipboard operations.
Returns a simple boolean for success/failure, without detailed error messages or events to diagnose copy issues in complex scenarios.