UNPKG

react-easy-social-share

Version:

Social media share for React, Nextjs and React applications.

77 lines (53 loc) • 3.76 kB
## react-easy-social-share 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. [![downloads](https://img.shields.io/npm/dm/react-share-lite.svg?label=monthly%20downloads)](https://www.npmjs.com/package/react-share-lite) [![downloads](https://img.shields.io/npm/dt/react-share-lite.svg?label=total%20downloads)](https://www.npmjs.com/package/react-share-lite) [![NPM](https://img.shields.io/npm/v/react-share-lite.svg)](https://www.npmjs.com/package/react-share-lite) ![npm bundle size](https://img.shields.io/bundlephobia/min/next-share) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs. --- ## Installation To install react-easy-social-share, simply run: ```bash npm install react-easy-social-share ``` or ```bash yarn add react-easy-social-share ``` ## šŸ“² Supported Platforms - Facebook - Twitter - LinkedIn - WhatsApp - Telegram - Messenger - Email - Pinterest - Reddit - Line ## šŸ“• Share Button Global Props 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} /> } ``` ## License react-easy-social-share is licensed under the MIT License. ## Contacto [LinkedIn](https://www.linkedin.com/in/hugo345?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=android_app)