{"id":21034484,"url":"https://github.com/animify/usecopy","last_synced_at":"2025-05-15T13:32:43.927Z","repository":{"id":48016385,"uuid":"186455477","full_name":"animify/useCopy","owner":"animify","description":"📋 A React hook to copy dynamic textual data.","archived":false,"fork":false,"pushed_at":"2022-12-03T09:20:46.000Z","size":323,"stargazers_count":9,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T21:48:36.643Z","etag":null,"topics":["clipboard","copy","hooks","react","reacthooks"],"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/animify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-13T16:16:03.000Z","updated_at":"2023-12-21T16:21:01.000Z","dependencies_parsed_at":"2023-01-22T20:46:24.891Z","dependency_job_id":null,"html_url":"https://github.com/animify/useCopy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animify%2FuseCopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animify%2FuseCopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animify%2FuseCopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animify%2FuseCopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/animify","download_url":"https://codeload.github.com/animify/useCopy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254349583,"owners_count":22056376,"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","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","copy","hooks","react","reacthooks"],"created_at":"2024-11-19T13:07:18.907Z","updated_at":"2025-05-15T13:32:43.915Z","avatar_url":"https://github.com/animify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# useCopy 📋\n\n A React Hook that provides an easy interface to copy textual data.\n \n ```js\nimport React from 'react';\nimport useCopy from 'use-copy';\n\nfunction Count() {\n    const [copied, copy, setCopied] = useCopy(\"Text to copy\");\n\n    const copyText = () =\u003e {\n      copy();\n\n      setTimeout(() =\u003e {\n        setCopied(false);\n      }, 3000);\n    };\n\n    return (\n        \u003cdiv\u003e\n            { copied ? \"Copied to clipboard\" : \u003ca onClick={copyText}\u003eCopy text\u003c/a\u003e }\n        \u003c/div\u003e\n    );\n}\n```\n\n[Full example on Code Sandbox](https://codesandbox.io/s/101qo4m9n3)\n\n## Install\n\n```bash\n# Yarn\nyarn add use-copy\n\n# NPM\nnpm install use-copy\n```\n\n## Features\n\n- Feather light\n- Pass dynamic text\n- Easy interface\n- Full Typescript support\n- Uses the battle-tested [copy-to-clipboard](https://github.com/sudodoki/copy-to-clipboard)\n\n## Prerequisites\n\n⚠️ React hooks require `react` at version 16.7.0-alpha.0 or higher.\n\n## Issues \u0026 suggestions\n\nIf you find any runtime issues or have any suggestions on how to improve the package please do open an [issue](https://github.com/animify/useCopy/issues)!\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimify%2Fusecopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanimify%2Fusecopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimify%2Fusecopy/lists"}