Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-copy-button-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-copy-button-wrapper

Component Wrapper for Copy to Clipboard Button with React

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
304
decreased by-11.88%
Maintainers
1
Weekly downloads
 
Created
Source

react-copy-button-wrapper

Component Wrapper for Copy to Clipboard Button with React

Usage

% npm install react-copy-button-wrapper

<ReactCopyButtonWrapper text='test'>
  <button>Copy</button>
</ReactCopyButtonWrapper>

Example

Please look at /example directory.

Demo page is here: http://pastak.github.io/react-copy-button-wrapper/example/example.html

How works

Modern Browsers

Firefox, Chrome, Opera, IE9+ works with Selection API and execCommand

Safari

It works with react-zeroclipboard which is relies on zeroclipboard.

It depends on Flash!!!!!!!!!!!!

< IE9

It works with window.clipboardData.setData

Motivation

Clipboard API was comming to modern browsers and clipboard.js is great solution. However Safari and old browsers don't support yet.

Zeroclipboard is solution for all browsers but it's not better because depends on flash...

And some react components for copy buttons ( for example react-copy-to-clipboard react-clipboard ) have only support for modern browsers.

This component's goal is that works with modern browsers and safari and old-IE.

Keywords

FAQs

Package last updated on 08 Apr 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