# clippie

> Teeny-tiny browser clipboard copy

Latest version **4.2.1** (published 2026-07-01) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install clippie
pnpm add clippie
yarn add clippie
bun add clippie
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.2.1 |
| Published | 2026-07-01 |
| First published | 2022-11-24 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | silverwind |
| Maintainers | silverwind |
| Keywords | clipboard, copy, copy-to-clipboard, browser, clipboard-api |

## Links

- npm: https://www.npmjs.com/package/clippie
- Repository: silverwind/clippie
- npm.io page: https://npm.io/package/clippie

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 4.2.1 (latest) — 2026-07-01
- 4.2.0 — 2026-05-17
- 4.1.15 — 2026-04-28
- 4.1.14 — 2026-04-17
- 4.1.13 — 2026-04-16
- 4.1.12 — 2026-04-16
- 4.1.11 — 2026-04-16
- 4.1.10 — 2026-02-09
- 4.1.9 — 2025-11-07
- 4.1.8 — 2025-09-14
- 4.1.7 — 2025-05-19
- 4.1.6 — 2025-04-05
- 4.1.5 — 2025-02-14
- 4.1.4 — 2024-11-29
- 4.1.3 — 2024-07-11
- … 25 more at https://npm.io/package/clippie/versions

## README

# clippie
[![](https://img.shields.io/npm/v/clippie.svg?style=flat)](https://www.npmjs.org/package/clippie) [![](https://img.shields.io/npm/dm/clippie.svg)](https://www.npmjs.org/package/clippie) [![](https://img.shields.io/bundlephobia/minzip/clippie.svg)](https://bundlephobia.com/package/clippie) [![](https://packagephobia.com/badge?p=clippie)](https://packagephobia.com/result?p=clippie) [![](https://depx.co/api/badge/clippie)](https://depx.co/pkg/clippie)

`clippie` copies text and/or images to clipboard in browsers. Text copy works on both secure and insecure contexts (via fallback), image or array copy requires a secure context (https or localhost).

## Usage

```js
import {clippie} from "clippie";

// copy text
const success = await clippie("text to copy");

// copy image
const success = await clippie(imageBlob);

// copy image and text at once
const success = await clippie([imageBlob, "image description"]);
```

See [index.html](./index.html) for more example.

## API
### clippie(content, [options])

- `content` *string | Blob | Array\<string | Blob\>*: Content to copy. If an Array is passed, will construct a [`ClipboardItem`](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem) from each unique type.
- `options` *object*
  - `reject`: *boolean*: Whether to reject on unexpected errors. Default: `false`.

Returns `true` when all content was successfully copied, `false` when not. Will never throw unless `reject` is `true`.

© [silverwind](https://github.com/silverwind), distributed under BSD licence

---
_Source: https://npm.io/package/clippie · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
