Social media share buttons for your next React apps.
π Features
No dependencies
Compatible with both JavaScript and TypeScript
Share buttons for your next React app:
Facebook
Line
Pinterest
Reddit
Telegram
Tumblr
Twitter
Viber
Weibo
Whatsapp
Linkedin
π§ Install
next-share is available on npm. It can be installed with the following command:
npm install next-share --save
next-share is available on yarn as well. It can be installed with the following command:
yarn add next-share --save
π‘ Usage
π Facebook
import{FacebookShareButton,FacebookIcon,}from'next-share'<FacebookShareButtonurl={'https://github.com/next-share'}quote={'next-share is a social share buttons for your next React apps.'}hashtag={'#nextshare'}><FacebookIconsize={32}round/></FacebookShareButton>
π Line
import{LineShareButton,LineIcon,}from'next-share'<LineShareButtonurl={'https://github.com/next-share'}title={'next-share is a social share buttons for your next React apps.'}><LineIcon/></LineShareButton>
π Pinterest
import{PinterestShareButton,PinterestIcon,}from'next-share'<PinterestShareButtonurl={'https://github.com/next-share'}media={'next-share is a social share buttons for your next React apps.'}><PinterestIconsize={32}round/></PinterestShareButton>
π Reddit
import{RedditShareButton,RedditIcon,}from'next-share'<RedditShareButtonurl={'https://github.com/next-share'}title={'next-share is a social share buttons for your next React apps.'}windowWidth={660}windowHeight={460}><RedditIconsize={32}round/></RedditShareButton>
π Telegram
import{TelegramShareButton,TelegramIcon,}from'next-share'<TelegramShareButtonurl={'https://github.com/next-share'}title={'next-share is a social share buttons for your next React apps.'}><TelegramIconsize={32}round/></TelegramShareButton>
π Tumblr
import{TumblrShareButton,TumblrIcon,}from'next-share'<TumblrShareButtonurl={'https://github.com/next-share'}title={'next-share is a social share buttons for your next React apps.'}><TumblrIconsize={32}round/></TumblrShareButton>
π Twitter
import{TwitterShareButton,TwitterIcon,}from'next-share'<TwitterShareButtonurl={'https://github.com/next-share'}title={'next-share is a social share buttons for your next React apps.'}><TwitterIconsize={32}round/></TwitterShareButton>
π Viber
import{ViberShareButton,ViberIcon,}from'next-share'<ViberShareButtonurl={'https://github.com/next-share'}title={'next-share is a social share buttons for your next React apps.'}><ViberIconsize={32}round/></ViberShareButton>
π Weibo
import{WeiboShareButton,WeiboIcon,}from'next-share'<WeiboShareButtonurl={'https://github.com/next-share'}title={'next-share is a social share buttons for your next React apps.'}image={`${String(window.location)}/${example-image}`}><WeiboIconsize={32}round/></WeiboShareButton>
π Whatsapp
import{WhatsappShareButton,WhatsappIcon,}from'next-share'<WhatsappShareButtonurl={'https://github.com/next-share'}title={'next-share is a social share buttons for your next React apps.'}separator=":: "><WhatsappIconsize={32}round/></WhatsappShareButton>
Source of the content (e.g. your website or application name).
β
windowWidth
number
550
Opened window width.
β
windowHeight
number
400
Opened window height.
β
π Wrap Up
If you think any of the next-share can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.
π Contribution
We'd love to have your helping hand on contributions to next-share by forking and sending a pull request!
Your contributions are heartily β‘ welcome, recognized and appreciated. (βΏβ βΏβ )