# react-web-share-button

> Share button that is using the Web Share API with fallback for browsers that do not support it

Latest version **1.0.1** (published 2018-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-web-share-button
pnpm add react-web-share-button
yarn add react-web-share-button
bun add react-web-share-button
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-03-01 |
| First published | 2018-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 429.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | AvraamMavridis |
| Maintainers | avrmav |
| Keywords | share, button, Web, Share, API, facebook, twitter, googleplus, gp |

## Links

- npm: https://www.npmjs.com/package/react-web-share-button
- Repository: https://github.com/AvraamMavridis/react-web-share-button
- Homepage: https://github.com/AvraamMavridis/react-web-share-button#readme
- Issues: https://github.com/AvraamMavridis/react-web-share-button/issues
- npm.io page: https://npm.io/package/react-web-share-button

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-03-01
- 1.0.0 — 2018-03-01

## README

# react-web-share-button
React Share Button Component that uses the Web Share API with fallback

[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com)

[![NPM](https://nodei.co/npm/react-web-share-button.png?mini=true)](https://nodei.co/npm/react-web-share-button/)

# Demo
[![Edit r439xy43zm](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/r439xy43zm)

# How to use it:

```javascript
import ShareButton from 'react-web-share-button';

<ShareButton title="My Great Page" text="A really great page" url="http://www.greatpage.com" />
```

### Browsers with Web Share API support

<img src="https://raw.githubusercontent.com/AvraamMavridis/react-web-share-button/master/screenshot_support.png" height="400px">

### Browsers without Web Share API support

<img src="https://raw.githubusercontent.com/AvraamMavridis/react-web-share-button/master/screenshot_not_supported.png" height="400px">


# 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  |

---
_Source: https://npm.io/package/react-web-share-button · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
