React Copy to Clipboard Lite

JSON →
library 1.0.3 ·javascript
verified May 27, 2026

react-copy-to-clipboard-lite is a lightweight (approx. 1.1 kB minzipped), dependency-free utility for copying text to the clipboard in React applications, currently at version 1.0.3. It offers a tiered fallback mechanism, utilizing the modern Clipboard API first and gracefully falling back to `document.execCommand` for older browsers like Safari, without relying on deprecated `prompt()` calls for permissions. The library provides structured `CopyResult` objects for robust error handling and never throws exceptions. It is designed to be SSR-safe, permission-aware (checking `navigator.permissions.query()` without prompting), and fully supports React 18+ environments, including new React 19 features like `formAction` and `useActionState`. This package differentiates itself through its minimal footprint, lack of runtime dependencies, and explicit handling of permissions and SSR contexts.

total hits 17
actors 7 distinct systems
last hit 21h ago human
GPTBot
5
MetaBot
4
Script
1
ClaudeBot
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France · 🇸🇬 Singapore