{"id":15837035,"url":"https://github.com/afeiship/react-clipboard","last_synced_at":"2026-05-15T20:03:55.266Z","repository":{"id":57122974,"uuid":"199099660","full_name":"afeiship/react-clipboard","owner":"afeiship","description":"A simple React wrapper around the clipboard.js library.","archived":false,"fork":false,"pushed_at":"2021-03-01T11:01:14.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-10T09:05:28.074Z","etag":null,"topics":["clipboard","clippy","copy","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-27T01:17:54.000Z","updated_at":"2021-03-01T11:01:16.000Z","dependencies_parsed_at":"2022-08-25T17:11:16.774Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/react-clipboard","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/afeiship/react-clipboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-clipboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-clipboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-clipboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-clipboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/react-clipboard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Freact-clipboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378806,"owners_count":24240896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard","clippy","copy","react"],"created_at":"2024-10-05T15:20:35.101Z","updated_at":"2026-05-15T20:03:50.205Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-clipboard\n\u003e A simple React wrapper around the clipboard.js library.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```shell\nnpm install -S @jswork/react-clipboard\n```\n\n## properties\n| Name      | Type   | Required | Default | Description                           |\n| --------- | ------ | -------- | ------- | ------------------------------------- |\n| className | string | false    | -       | The extended className for component. |\n| value     | string | false    | -       | The runtime value.                    |\n| onChange  | func   | false    | noop    | The handler when value change.        |\n\n\n## usage\n1. import css\n  ```scss\n  @import \"~@jswork/react-clipboard/dist/style.css\";\n\n  // or use sass\n  @import \"~@jswork/react-clipboard/dist/style.scss\";\n\n  // customize your styles:\n  $react-clipboard-options: ()\n  ```\n2. import js\n  ```js\n  import ReactDemokit from '@jswork/react-demokit';\n  import React from 'react';\n  import ReactDOM from 'react-dom';\n  import ReactClipboard from '@jswork/react-clipboard';\n  import './assets/style.scss';\n\n  class App extends React.Component {\n    state = {\n      value: `道可道，非常道；名可名，非常名。\n  无名，天地之始，有名，万物之母。\n  故常无欲，以观其妙，常有欲，以观其徼。\n  此两者，同出而异名，同谓之玄，玄之又玄，众妙之门。`\n    };\n\n    render() {\n      return (\n        \u003cReactDemokit\n          className=\"p-3 app-container\"\n          url=\"https://github.com/afeiship/react-clipboard\"\u003e\n          \u003cdiv className=\"clippy\"\u003e\n            \u003ctextarea\n              value={this.state.value}\n              onChange={(e) =\u003e {\n                console.log(e.target.value);\n                this.setState({ value: e.target.value });\n              }}\u003e\n              You text goes here!\n            \u003c/textarea\u003e\n            \u003cReactClipboard value={this.state.value}\u003eClickToCopy!\u003c/ReactClipboard\u003e\n          \u003c/div\u003e\n        \u003c/ReactDemokit\u003e\n      );\n    }\n  }\n\n  ReactDOM.render(\u003cApp /\u003e, document.getElementById('app'));\n\n  ```\n\n## documentation\n- https://afeiship.github.io/react-clipboard/\n\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/react-clipboard/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/react-clipboard\n[version-url]: https://npmjs.org/package/@jswork/react-clipboard\n\n[license-image]: https://img.shields.io/npm/l/@jswork/react-clipboard\n[license-url]: https://github.com/afeiship/react-clipboard/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-clipboard\n[size-url]: https://github.com/afeiship/react-clipboard/blob/master/dist/react-clipboard.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/react-clipboard\n[download-url]: https://www.npmjs.com/package/@jswork/react-clipboard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Freact-clipboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Freact-clipboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Freact-clipboard/lists"}