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

react-web-share-button

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-web-share-button

Share button that is using the Web Share API with fallback for browsers that do not support it

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35
increased by9.38%
Maintainers
1
Weekly downloads
 
Created
Source

react-web-share-button

React Share Button Component that uses the Web Share API with fallback

forthebadge

NPM

Demo

Edit r439xy43zm

How to use it:

import ShareButton from 'react-web-share-button';

<ShareButton title="My Great Page" text="A really great page" url="http://www.greatpage.com" />

Browsers with Web Share API support

Browsers without Web Share API support

Options:

NameDescription
buttonTextText or Node that is used on the Share button
buttonStyleInline styles for the Button
fallbackContainerStylesInline styles for the fallback container
fallbackContainerOnShowStylesInline styles for the fallback container when it becames visible
targetWhere to open url in case of the fallback dialog
fallbackButtonStyleInline styles for the fallback buttons
urlUrl to share
onSuccessCalled when the share is successful, only in case where Web Share API is supported
onErrorCalled when the share is not successful, only in case where Web Share API is supported
textText that is used by the Web Share API
titleTitle that is used by the Web Share API

Keywords

FAQs

Package last updated on 01 Mar 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