# web-clipboard

> simple class for work with clipboad

Latest version **1.0.3** (published 2022-02-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install web-clipboard
pnpm add web-clipboard
yarn add web-clipboard
bun add web-clipboard
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2022-02-09 |
| First published | 2022-02-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 29.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | traineratwot |
| Maintainers | traineratwot |
| Keywords | vue3, clipboard, browser |

## Links

- npm: https://www.npmjs.com/package/web-clipboard
- Repository: https://github.com/Traineratwot/clipboard
- Homepage: https://github.com/Traineratwot/clipboard#readme
- Issues: https://github.com/Traineratwot/clipboard/issues
- npm.io page: https://npm.io/package/web-clipboard

## 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

- 1.0.3 (latest) — 2022-02-09
- 1.0.2 — 2022-02-09
- 1.0.1 — 2022-02-09
- 1.0.0 — 2022-02-09

## README

# clipboard
![npm](https://img.shields.io/npm/v/web-clipboard)
![GitHub issues](https://img.shields.io/github/issues/Traineratwot/clipboard)
![npm bundle size](https://img.shields.io/bundlephobia/min/web-clipboard)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/web-clipboard)

Simple use in browser
``` html
<script src="../dist/index.umd.js"></script>
<script>
	const clipboard = new WebClipboard.WebClipboard()
</script>


<button onclick="cl.write(textareaWrite.value)">wtite</button>
<button onclick="cl.read().then((val)=>{textareaRead.value = val})">read</button>
<input id="textareaWrite" placeholder="write" type="text"></input>
<input id="textareaRead" placeholder="read" type="text"></input>
```
Simple use in vue3
```js
import clipboard from "web-clipboard";
declare module "@vue/runtime-core" {
	interface ComponentCustomProperties {
		$clipboard:typeof clipboard
	}
}
createApp(App)
	.use(clipboard)

...
	var userClipboard = await this.$clipboard.read()
	this.$clipboard.write('You copy this text !!')
```

Simple use in other npm project
```js
import clipboard from "web-clipboard";
var userClipboard = await clipboard.read()
clipboard.write('You copy this text !!')
```

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