Documentation

Buttons

Installation

You can install it using yarn add share-button-links-react or npm install share-button-links-react.

To import it inside your components just add:

import { ButtonFacebook } from 'share-button-links-react/components/buttons';

To import the CSS or SCSS just add: @import 'share-button-links-react/main.css'; or @import 'share-button-links-react/main.scss';.

Note: Most of the svg icons in buttons belong to Bootstrap Icons. and others to Tabler Icons.

Facebook

Usage

Facebook

  <ButtonFacebook
    title="..."
    text="..."
    url="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
titleStringEmptyThe title of the button/link.
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the facebook icon.

Whatsapp

Usage

Whatsapp

  <ButtonWhatsapp
    text="..."
    url="..."
    message="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
messageStringEmptyHere you can add a message when you share the url to Whatsapp.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the whatsapp icon.

Telegram

Usage

Telegram

  <ButtonTelegram
    text="..."
    url="..."
    message="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
messageStringEmptyHere you can add a message when you share the url to Whatsapp.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the telegram icon.

Twitter

Usage

Twitter

  <ButtonTwitter
    title="..."
    text="..."
    url="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
title*StringAdd titkeThe title of the button/link.
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the twitter icon.

LinkedIn

Usage

LinkedIn

  <ButtonLinkedIn
    text="..."
    url="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the linkedin icon.

Reddit

Usage

Reddit

  <ButtonReddit
    title="..."
    text="..."
    url="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
title*StringAdd titleThe title of the button/link.
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the reddit icon.

Pinterest

Usage

Pinterest

  <ButtonPinterest
    description="..."
    url="..."
    text="..."
    mediaUrl="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
description*StringAdd the descriptionThe description of the button/link.
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
mediaUrl*String#!The image of the button/link to share.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the pinterest icon.

Tumblr

Usage

Tumblr

  <ButtonTumblr
    title="..."
    content="..."
    text="..."
    url="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
title*StringAdd titleThe title of the button/link.
contentStringAdd your contentThe content of the button/link.
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the tumblr icon.

Pocket

Usage

Pocket

  <ButtonPocket
    title="..."
    text="..."
    url="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
titleStringEmptyThe title of the button/link.
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the pocket icon.

Email

Usage

Email

  <ButtonEmail
    title="..."
    subject="..."
    content="..."
    text="..."
    url="..."
    isRounded
    hasIcon
  />

Props

With * is required.

PropTypeDefaultComment
title*StringAdd titleThe title of the button/link.
subject*StringAdd titleThe subject of the button/link.
content*StringAdd your contentThe content of the button/link.
text*StringAdd textThe text of the button/link.
url*String#!The url of the button/link to share.
toStringemptyThe to (email) of the button/link.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the Email icon.

Copy

Usage


  <ButtonCopy
    text="..."
    isRounded
    hasIcon
  />

Props

With * is required.

Just click the button to copy the URL.

PropTypeDefaultComment
text*StringAdd textThe text of the button/link.
isRoundedBooleanfalseAdd little rounded corners.
hasIconBooleanfalseAdd the copy icon.