# react-sociable

> Provides a universal social button component

Latest version **0.0.6** (published 2018-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-sociable
pnpm add react-sociable
yarn add react-sociable
bun add react-sociable
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-02-13 |
| First published | 2017-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 247.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Zach Davis |
| Maintainers | castiron, zdavis |

## Links

- npm: https://www.npmjs.com/package/react-sociable
- Repository: https://github.com/castiron/react-sociable
- Homepage: https://github.com/castiron/react-sociable#readme
- Issues: https://github.com/castiron/react-sociable/issues
- npm.io page: https://npm.io/package/react-sociable

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^15.5.4
- [query-string](https://npm.io/package/query-string.md) ^4.3.4
- [react-cookie](https://npm.io/package/react-cookie.md) ^1.0.5

## Recent versions

- 0.0.6 (latest) — 2018-02-13
- 0.0.5 — 2017-06-30
- 0.0.4 — 2017-06-30
- 0.0.3 — 2017-06-30
- 0.0.2 — 2017-06-30
- 0.0.1 — 2017-06-30

## README

# Simple social sharing buttons as react components.

For example:

```
import React from 'react';
import Sociable from 'react-sociable';

class Example extends React.Component {

  render() {

    const url = window.location.href;
    const msg = "Share it like you've never shared before!";

    return (
      <div>
         <Sociable.FacebookButton
            url={url}
            message={msg}
            windowOptions={["", "", "width=600,height=300"]}
            appId="233201753822876"
          >
            {'Facebook'}
          </Sociable.FacebookButton> 
         <Sociable.TwitterButton
            url={url}
            message={msg}
            windowOptions={["", "", "width=600,height=300"]}
          >
            {'Twitter'}
          </Sociable.TwitterButton> 
         <Sociable.EmailButton
            url={url}
            message={msg}
          >
            {'Email'}
          </Sociable.EmailButton> 
         <Sociable.PinterestButton
            url={url}
            message={msg}
            media="some/path/to/file"
          >
            {'Pinterest'}
          </Sociable.PinterestButton> 
         <Sociable.GooglePlusButton
            url={url}
          >
            {'Google Plus'}
          </Sociable.GooglePlusButton> 
      </div>
    )
  }
}

export default Example;
```

____
### Credit
This module is heavily inspired by the [react-social module](https://www.npmjs.com/package/react-social). It takes a similar approach, opting for higher order components and ES2015 syntax rather than mixins. As such, it should be compatible with React 15.5 and up.

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