We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7390484 commit 31871faCopy full SHA for 31871fa
README.md
@@ -49,6 +49,20 @@ npm install @compactjs/clipboard
49
import { clipboard } from '@compactjs/clipboard';
50
```
51
52
+API:
53
+
54
+```typescript
55
+/**
56
+ * Copy text to clipboard.
57
+ * @param input Either text to copy or HTMLElement to copy from
58
+ */
59
+function clipboard(
60
+ input: string | HTMLTextAreaElement | HTMLInputElement
61
+): void;
62
+```
63
64
+**Note:** A copy to clipboard need to be triggered by user action, like a button press!
65
66
### Example:
67
68
```javascript
0 commit comments