New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clopy

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clopy

Vue component for a copy-to-clipboard button.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

Clopy!

Simple copy-to-clipboard button.

Installation and Usage

Install the package

yarn add clopy
// or
npm install clopy --save

Import the clopy element:

import Vue from 'vue';
import { Clopy } from 'clopy';

Vue.component('clopy', Clopy);

// Alternatively
import Clopy from 'clopy';

Vue.use(Clopy);

Add the element to the HTLM

<clopy input=".some-input">
  1. Make sure that the input parameter is pointed to the input element you wish to copy from.
  2. Click the clopy icon/button and copy the content of the input!

The input which is to be copied could be any element with either a value attribute or a innerText, if both, value precedes the innerText.

Customizing

By default the clopy button has the clopy-button class, it can be changed by setting another class via the exposed classes attribute, which will then ignore the default class.
If the default icon does not suit you, just set the use-icon attribute to false (boolean, so bind it with :use-icon) and it will be ignored.

Credits

Font-awesome (default icon).
Bootstrap (default button class, slightly modified).

License

MIT

Keywords

FAQs

Package last updated on 14 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc