# nkbt/react-copy-to-clipboard

Copy-to-clipboard React component

Repository: https://github.com/nkbt/react-copy-to-clipboard
Canonical: https://ross.abutalabs.com/products/react-copy-to-clipboard
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-03-07T10:01:52+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 71, release rhythm 42, longevity 100
- inputs: {"age_days": 4078, "days_push": 179, "days_rel": 179, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2370, forks 131 (observed 2026-08-28T04:06:41.749607+00:00)

## What it is
A small React component that wraps the copy-to-clipboard library to copy text to the clipboard on click. It renders no tags itself and wraps a single child element that captures the click, with an optional onCopy callback.

## Use cases
- copy text to clipboard in a react app
- add a copy button to a code snippet
- copy input field value on button click
- show feedback after user copies text
- clipboard copy with fallback for older browsers

## When to choose
- you need a simple, battle-tested React wrapper for clipboard copying
- you want click-to-copy behavior on any element with minimal setup
- you need broad browser support including legacy fallbacks

## When to avoid
- you are not using React
- you need the modern async Clipboard API with permissions handling
- you need to copy rich content like images or HTML, not just text

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, developer-tools
- domain: frontend, web-development, developer-tools
- platform: browser
- tags: react-component, clipboard, copy-to-clipboard, npm, nodejs, javascript

## Member repositories
- nkbt/react-copy-to-clipboard (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:41.749607+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:35:25.413294+00:00, confidence not recorded.
  - readme: https://github.com/nkbt/react-copy-to-clipboard (fetched 2026-08-28T04:06:41.749607+00:00, sha 7fd8938622c7)
  - registry_npm: https://registry.npmjs.org/react-copy-to-clipboard (fetched 2026-08-29T10:16:30.475206+00:00, sha 956621851a5d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
