react-easy-social-share
Version:
Social media share for React, Nextjs and React applications.
77 lines (53 loc) ⢠3.76 kB
Markdown
react-easy-social-share is a simple and easy-to-use library for adding social media share buttons to your React, Next and react applications.
[](https://www.npmjs.com/package/react-share-lite) [](https://www.npmjs.com/package/react-share-lite)
[](https://www.npmjs.com/package/react-share-lite)  [](https://standardjs.
---
To install react-easy-social-share, simply run:
```bash
npm install react-easy-social-share
```
or
```bash
yarn add react-easy-social-share
```
- Facebook
- Twitter
- LinkedIn
- WhatsApp
- Telegram
- Messenger
- Email
- Pinterest
- Reddit
- Line
Each button supports a set of global props that are consistent across all buttons. However, in addition to these global props, each button also possesses its own unique set of specific properties. These specific properties are tailored to the individual functionality and customization options of each button.
| Props | Type | Default | Description | Required |
| :----------- | :------ | :------------ | :------------------------------------------------------------------------------------------------ | :------- |
| url | string | | The URL of the shared page. | TRUE |
| title | string | | The title of the shared page. | FALSE |
| windowWidth | number | 550 | Opened window width. | FALSE |
| windowHeight | number | 400 | Opened window height. | FALSE |
| blankTarget | boolean | false | Open share window in a new tab if set to `true`. | FALSE |
| bgColor | string | related color | Icon background color. | FALSE |
| round | boolean | false | The "round" attribute creates a fully circular button shape, giving it a 100% rounded appearance. | FALSE |
| borderRadius | number | 0px | Custom round share. | FALSE |
| size | number | 64px | The button size. | FALSE |
| buttonTitle | string | | The title of button used instead of icon. | FALSE |
šØāš» <b>Example</b>
```jsx
import React from 'react'
import { FacebookShare } from 'react-easy-social-share'
const ShareButtons = () => {
const shareUrl = 'https://github.com'
const title = 'Check out this awesome website!'
return <FacebookShare url={shareUrl} quote={title} />
}
```
react-easy-social-share is licensed under the MIT License.
[](https://www.linkedin.com/in/hugo345?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=android_app)