# sudodoki/copy-to-clipboard

Copy stuff into clipboard from your browser using JS

Repository: https://github.com/sudodoki/copy-to-clipboard
Canonical: https://ross.abutalabs.com/products/copy-to-clipboard
Homepage: http://sudodoki.github.io/copy-to-clipboard/example/
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-08-05T02:19:51+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 81, longevity 100
- inputs: {"age_days": 4120, "days_push": 29, "days_rel": 131, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1400, forks 126 (observed 2026-08-28T04:04:37.118078+00:00)

## What it is
A small JavaScript library for copying text to the clipboard in the browser, using the Async Clipboard API with automatic fallback to document.execCommand('copy'). It supports copying rich text (text/html), custom ClipboardItem construction, and an optional prompt-based last resort.

## Use cases
- copy text to clipboard in the browser
- copy rich text html to clipboard with plain text fallback
- clipboard copy fallback for non-https contexts
- copy multiline or tab-separated data to clipboard
- copy text from modal dialogs or fullscreen elements
- add a copy button to a web app

## When to avoid
- you are building an Electron app (use Electron's clipboard API instead)
- you need clipboard read access, not just writing
- you are in a Node.js/server environment with no DOM

## Facets
- artifact type: library
- maturity: active
- function: developer-tools, gui
- domain: web-development, frontend, developer-tools
- platform: browser
- tags: clipboard, copy-to-clipboard, browser-api, execcommand-fallback, rich-text-copy, javascript, nodejs

## Member repositories
- sudodoki/copy-to-clipboard (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:37.118078+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-30T04:39:07.791222+00:00, confidence not recorded.
  - readme: https://github.com/sudodoki/copy-to-clipboard (fetched 2026-08-28T04:04:37.118078+00:00, sha bf54730f65cd)
  - homepage: http://sudodoki.github.io/copy-to-clipboard/example/ (fetched 2026-08-29T11:53:28.065976+00:00, sha 33c9d3c4a83b)
  - registry_npm: https://registry.npmjs.org/copy-to-clipboard (fetched 2026-08-29T11:53:28.074810+00:00, sha 984a2f9ba490)
- Data as of 2026-08-30T08:39:29.467469+00:00.
