{"id":16294025,"url":"https://github.com/axetroy/react-download","last_synced_at":"2025-03-20T04:30:23.138Z","repository":{"id":143735151,"uuid":"91492508","full_name":"axetroy/react-download","owner":"axetroy","description":" react component for click and then download the specify content file.","archived":false,"fork":false,"pushed_at":"2019-04-08T12:43:00.000Z","size":273,"stargazers_count":36,"open_issues_count":3,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T14:22:11.653Z","etag":null,"topics":["download","react","react-component","react-download"],"latest_commit_sha":null,"homepage":"https://axetroy.github.io/react-download/","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/axetroy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-16T18:42:35.000Z","updated_at":"2022-10-20T10:30:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"878246c9-fed8-4fcd-a9fa-4ab6890fd341","html_url":"https://github.com/axetroy/react-download","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axetroy%2Freact-download","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axetroy%2Freact-download/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axetroy%2Freact-download/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axetroy%2Freact-download/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axetroy","download_url":"https://codeload.github.com/axetroy/react-download/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244551743,"owners_count":20470907,"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":["download","react","react-component","react-download"],"created_at":"2024-10-10T20:13:55.291Z","updated_at":"2025-03-20T04:30:22.808Z","avatar_url":"https://github.com/axetroy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-download\n\nreact component for click and then download the specify content file.\n\n[Online Demo](https://axetroy.github.io/react-download/)\n\n### Installation\n\n```bash\nnpm install @axetroy/react-download\n```\n\n### Usage\n\n```javascript\nimport React from 'react';\nimport { render } from 'react-dom';\nimport Download from '@axetroy/react-download';\n\nconst element = document.createElement('div');\ndocument.body.appendChild(element);\n\nclass App extends React.Component {\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cDownload file=\"test.md\" content=\"# hello world\"\u003e\n          \u003cbutton type=\"button\"\u003eClick and Download file\u003c/button\u003e\n        \u003c/Download\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nrender(\u003cApp /\u003e, element);\n```\n\n### Props\n\n- file\n\ndownload file name\n\n- content\n\nthe file content you want to download\n\n### Run the Demo\n\n```bash\ngit clone https://github.com/axetroy/react-download.git\nyarn\nyarn start\n```\n\n### License\n\nThe [MIT License](https://github.com/axetroy/react-download/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxetroy%2Freact-download","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxetroy%2Freact-download","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxetroy%2Freact-download/lists"}