# @feizheng/react-clipboard

> A simple React wrapper around the clipboard.js library.

Latest version **1.0.0** (published 2019-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @feizheng/react-clipboard
pnpm add @feizheng/react-clipboard
yarn add @feizheng/react-clipboard
bun add @feizheng/react-clipboard
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-12-25 |
| First published | 2019-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | afei |
| Maintainers | afeiship |
| Keywords | react, component |

## Links

- npm: https://www.npmjs.com/package/@feizheng/react-clipboard
- Repository: https://github.com/afeiship/react-clipboard
- Homepage: https://github.com/afeiship/react-clipboard#readme
- Issues: https://github.com/afeiship/react-clipboard/issues
- npm.io page: https://npm.io/package/@feizheng/react-clipboard

## Dependencies (4)

- [clipboard](https://npm.io/package/clipboard.md) ^2.0.4
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [@feizheng/noop](https://npm.io/package/@feizheng/noop.md) ^1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-12-25

## README

# react-clipboard
> A simple React wrapper around the clipboard.js library.

## installation
```shell
npm install -S @feizheng/react-clipboard
```

## update
```shell
npm update @feizheng/react-clipboard
```

## properties
| property  | type   | default | description |
| --------- | ------ | ------- | ----------- |
| className | String | -       | -           |
| value     | -      | -       | -           |
| onChange  | -      | -       | -           |

## usage
1. import css
  ```scss
  @import "~@feizheng/react-clipboard/dist/style.scss";

  // customize your styles:
  $react-clipboard-options: ()
  ```
2. import js
  ```js
  import ReactClipboard from '../src/main';
  import ReactDOM from 'react-dom';
  import React from 'react';
  import './assets/style.scss';

  class App extends React.Component {
    state = {
      value: `道可道，非常道；名可名，非常名。
  无名，天地之始，有名，万物之母。
  故常无欲，以观其妙，常有欲，以观其徼。
  此两者，同出而异名，同谓之玄，玄之又玄，众妙之门。`
    };
    render() {
      return (
        <div className="app-container">
          <div className="clippy">
            <textarea
              value={this.state.value}
              onChange={(e) => {
                console.log(e.target.value);
                this.setState({ value: e.target.value });
              }}>
              You text goes here!
            </textarea>
            <ReactClipboard value={this.state.value}>ClickToCopy!</ReactClipboard>
          </div>
        </div>
      );
    }
  }

  ReactDOM.render(<App />, document.getElementById('app'));

  ```

## documentation
- https://afeiship.github.io/react-clipboard/

---
_Source: https://npm.io/package/@feizheng/react-clipboard · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
