https://github.com/avraammavridis/react-web-share-button
React Share Button Component that uses the Web Share API with fallback
https://github.com/avraammavridis/react-web-share-button
Last synced: 2 months ago
JSON representation
React Share Button Component that uses the Web Share API with fallback
- Host: GitHub
- URL: https://github.com/avraammavridis/react-web-share-button
- Owner: AvraamMavridis
- License: mit
- Created: 2018-03-01T06:08:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T14:39:45.000Z (about 7 years ago)
- Last Synced: 2025-07-27T16:35:36.261Z (2 months ago)
- Language: JavaScript
- Size: 323 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-web-share-button
React Share Button Component that uses the Web Share API with fallback[](http://forthebadge.com)
[](https://nodei.co/npm/react-web-share-button/)
# Demo
[](https://codesandbox.io/s/r439xy43zm)# How to use it:
```javascript
import ShareButton from 'react-web-share-button';```
### Browsers with Web Share API support
### Browsers without Web Share API support
# Options:
| Name | Description
| ------------- |-------------:|
| buttonText | Text or Node that is used on the Share button |
| buttonStyle | Inline styles for the Button |
| fallbackContainerStyles | Inline styles for the fallback container |
| fallbackContainerOnShowStyles | Inline styles for the fallback container when it becames visible |
| target | Where to open url in case of the fallback dialog |
| fallbackButtonStyle | Inline styles for the fallback buttons |
| url | Url to share |
| onSuccess | Called when the share is successful, only in case where Web Share API is supported |
| onError | Called when the share is not successful, only in case where Web Share API is supported |
| text | Text that is used by the Web Share API |
| title | Title that is used by the Web Share API |