Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chrome-web-share

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-web-share

A lightweight React Share Button for mobile web with web share api integration, native intent support and fallback

  • 0.0.1-rc.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-share-button

A lightweight React Share Button for mobile web with web share api integration, native intent support and fallback.

Features

  1. Web Share Api (on Origin Trials experiment until April 2017)
  2. Share Modal Fallback for other browsers
  3. Share via Whatsapp, FB, Twitter, Mail or Copy on Clipboard

Installation

npm install --save react-share-button

Basic Usage

To get web-share API on your origin just request a token for your origin. You will get an email within 24 hrs with you key, then just add a meta tag

<meta http-equiv="origin-trial" content="**insert your token as provided in the the email here**">

Know more about OriginTrials

JSX:

import ShareBtn from 'react-share-button';

<ShareBtn
  url={url}
  text={text}
  className='ib'
  displayText='Share'
/>

CSS

@import "react-share-button/dist/ShareBtn"

Options

<ShareBtn/> Component

propdefaultdescription
className''Custom classnamem, you can style your button with this
url''The URL you want to share
text''The Text before the URL (E.g. Hey checkout this awesome property!!)
displayTextShareAny text you wanna write on button like Share Property
onShareBtnClick() => {}A callback function when share button is clicked
sharedBy(medium) => {console.log('shared via ', medium)}A callback function when user clicks on any share medium from share modal

Development

git clone https://github.com/housinghq/react-share-button
cd react-share-button
npm install
npm run storybook

Open an issue before opening a PR. The UI in this package is for mobile only.

License

MIT @ Loconsolutions

Keywords

FAQs

Package last updated on 23 Jan 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