{"id":13632276,"url":"https://github.com/hc-oss/react-web-share","last_synced_at":"2025-09-20T07:32:51.597Z","repository":{"id":41890950,"uuid":"260041963","full_name":"hc-oss/react-web-share","owner":"hc-oss","description":"Tiny web share wrapper with fallback for unsupported browsers","archived":false,"fork":false,"pushed_at":"2024-03-05T10:02:23.000Z","size":1792,"stargazers_count":65,"open_issues_count":28,"forks_count":38,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-19T10:09:38.026Z","etag":null,"topics":["api","fallback","hacktoberfest","lightweight","react","share","tiny","web"],"latest_commit_sha":null,"homepage":"https://codesandbox.io/s/react-web-share-46skt","language":"TypeScript","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/hc-oss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"harshzalavadiya"}},"created_at":"2020-04-29T20:44:49.000Z","updated_at":"2025-05-22T13:36:51.000Z","dependencies_parsed_at":"2024-01-22T01:14:52.306Z","dependency_job_id":"e3d2e10b-9902-4876-8dd7-8c9d864a6a0b","html_url":"https://github.com/hc-oss/react-web-share","commit_stats":{"total_commits":34,"total_committers":5,"mean_commits":6.8,"dds":0.4117647058823529,"last_synced_commit":"9bd00d6c325f24058a5a9a53e90783313acf864d"},"previous_names":["harshzalavadiya/react-web-share"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/hc-oss/react-web-share","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hc-oss%2Freact-web-share","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hc-oss%2Freact-web-share/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hc-oss%2Freact-web-share/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hc-oss%2Freact-web-share/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hc-oss","download_url":"https://codeload.github.com/hc-oss/react-web-share/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hc-oss%2Freact-web-share/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276064272,"owners_count":25578997,"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-09-20T02:00:10.207Z","response_time":63,"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":["api","fallback","hacktoberfest","lightweight","react","share","tiny","web"],"created_at":"2024-08-01T22:02:58.544Z","updated_at":"2025-09-20T07:32:51.573Z","avatar_url":"https://github.com/hc-oss.png","language":"TypeScript","funding_links":["https://github.com/sponsors/harshzalavadiya"],"categories":["TypeScript"],"sub_categories":[],"readme":"# react-web-share\n\nTiny [Web Share API](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share) wrapper with fallback for unsupported browsers\n\n[![GitHub Actions Status](https://github.com/hc-oss/react-web-share/workflows/NodeJS/badge.svg)](https://github.com/hc-oss/react-web-share/actions)\n[![NPM](https://img.shields.io/npm/v/react-web-share.svg)](https://npm.im/react-web-share)\n[![gzip](https://badgen.net/bundlephobia/minzip/react-web-share@latest)](https://bundlephobia.com/result?p=react-web-share@latest)\n\n[![Edit react-web-share](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-web-share-46skt)\n\n\u003e 💡 most browsers restricts web share api only to https websites\n\n## ✨ Features\n\n- 🍃 Only ~6kb gzipped and no external dependencies\n- 🌀 Uses React Portal\n- ✌ Written w/ TypeScript\n\n## 🔧 Installation\n\n```bash\nnpm i react-web-share    # npm\nyarn add react-web-share # yarn\n```\n\n## Preview\n\n### Mobile\n\n![Mobile Preview](https://user-images.githubusercontent.com/5774849/188565874-177a6cc4-0521-4f14-8339-4c31f1476a5d.jpg)\n\n### Desktop\n\n![Desktop Preview](https://user-images.githubusercontent.com/5774849/188565984-5782d979-b57b-4b6d-9135-591f77ea8ee7.jpg)\n\n## 📦 Example\n\n```tsx\nimport React, { useState } from \"react\";\nimport { RWebShare } from \"react-web-share\";\n\nconst Example = () =\u003e {\n  return (\n    \u003cdiv\u003e\n      \u003cRWebShare\n        data={{\n          text: \"Like humans, flamingos make friends for life\",\n          url: \"https://on.natgeo.com/2zHaNup\",\n          title: \"Flamingos\",\n        }}\n        onClick={() =\u003e console.log(\"shared successfully!\")}\n      \u003e\n        \u003cbutton\u003eShare 🔗\u003c/button\u003e\n      \u003c/RWebShare\u003e\n    \u003c/div\u003e\n  );\n};\n\nexport default Example;\n```\n\n## 👀 Props\n\n| Prop            | Description                 | Type                 | Default                                       |\n| --------------- | --------------------------- | -------------------- | --------------------------------------------- |\n| `data`          | Share Object                | `{text, url, title}` | `{text: \"\", url: currentURL, title: \"Share\"}` |\n| `sites`         | sites                       | `string[]`           | all platforms (see list below for key list)   |\n| `closeText`     | translate close             | `string`             | localise close text                           |\n| `onClick`       | callback on sucessful share |                      |                                               |\n| `disableNative` | disables native share       | `boolean`            | `false`                                       |\n\n## 🌎 Sites\n\n- facebook\n- twitter\n- whatsapp\n- reddit\n- telegram\n- linkedin\n- mail\n- copy (Copy to Clipboard)\n- vk\n- okru\n\n## 📜 License\n\nMIT \u0026copy; [harshzalavadiya](https://github.com/harshzalavadiya)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhc-oss%2Freact-web-share","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhc-oss%2Freact-web-share","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhc-oss%2Freact-web-share/lists"}