Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

react-copy-clipboard

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

react-copy-clipboard

A react component based on js, Click to copy and mouseover will show tip

    2.0.1latest

Version published
Maintainers
1
Yearly downloads
5,051
increased by195.73%

Weekly downloads

Readme

Source

Demo 示例

img

Github Address

English

A react component based on js, Click to copy and mouseover will show tip.

Install

Install with npm:

$ npm install --save react-copy-clipboard

Usage

import CopyClipboard from 'react-copy-clipboard'; <CopyClipboard text='www.google.cn' suffix='(click)'> <span>URL</span> </CopyClipboard>

Options

paramtype
textStringEnter the text what you need to copy
suffixStringHow to Use Tips


Chinese

一个基于react的组件, 点击文字实现复制和鼠标悬浮文字上方会显示文本和点击后的复制提示

安装

npm工具执行语法:

$ npm install --save react-copy-clipboard

使用

import CopyClipboard from 'react-copy-clipboard'; <CopyClipboard text='www.baidu.com' suffix='(点击复制)'> <span>地址</span> </CopyClipboard>

参数

paramtype
textString输入你需要要拷贝的文本
suffixString额外的提示用户如何使用

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc