control-copy
Version:
A vue3.js component to easily add copy to clipboard functionality to any html input tag
39 lines (26 loc) • 750 B
Markdown
A vue3.js component to easily add copy to clipboard functionality to any html input tag
```bash
npm i control-copy
```
```js
import CtrlC from "control-copy";
//for displaying default icon in your template. Wrap input tag in <CtrlC></Ctrl>
<CtrlC>
<input type="text" />
</CtrlC>
//or to display your emoji icon, pass in any emoji as prop
<CtrlC copyIcon="📃">
<input type="text" />
</CtrlC>
//or to display any string as copy button, pass in any string as prop
<CtrlC copyIcon="C">
<input type="text" />
</CtrlC>
```
At the moment only one child input tag is supported and only emoji and string are accepted as **copyIcon** param
ISC © Umair Khan 📬 umair@siqasoft.com