Socket
Socket
Sign inDemoInstall

react-share

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-share

Social media share buttons and share counts for React.


Version published
Weekly downloads
414K
increased by1.94%
Maintainers
1
Weekly downloads
 
Created

What is react-share?

The react-share npm package provides a collection of social media share buttons and share counts for React applications. It supports a wide range of social media platforms and allows for easy integration of sharing functionalities.

What are react-share's main functionalities?

Facebook Share Button

This feature allows you to create a Facebook share button with a customizable icon. The button can be used to share a specified URL on Facebook.

import { FacebookShareButton, FacebookIcon } from 'react-share';

const FacebookShare = () => (
  <FacebookShareButton url={'https://example.com'}>
    <FacebookIcon size={32} round={true} />
  </FacebookShareButton>
);

Twitter Share Button

This feature allows you to create a Twitter share button with a customizable icon. The button can be used to share a specified URL and title on Twitter.

import { TwitterShareButton, TwitterIcon } from 'react-share';

const TwitterShare = () => (
  <TwitterShareButton url={'https://example.com'} title={'Check this out!'}>
    <TwitterIcon size={32} round={true} />
  </TwitterShareButton>
);

LinkedIn Share Button

This feature allows you to create a LinkedIn share button with a customizable icon. The button can be used to share a specified URL on LinkedIn.

import { LinkedinShareButton, LinkedinIcon } from 'react-share';

const LinkedinShare = () => (
  <LinkedinShareButton url={'https://example.com'}>
    <LinkedinIcon size={32} round={true} />
  </LinkedinShareButton>
);

Share Count

This feature allows you to display the share count for a specified URL on Facebook. Similar components are available for other social media platforms.

import { FacebookShareCount } from 'react-share';

const FacebookShareCountExample = () => (
  <FacebookShareCount url={'https://example.com'} />
);

Other packages similar to react-share

Keywords

FAQs

Package last updated on 24 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc