npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

share-button-links-react

v2.3.3

Published

Share buttons links for websites, blogs and more.

Downloads

356

Readme

Share Button Links React

React share buttons for websites, blogs, docs and landing pages.

Installation

npm install share-button-links-react

or

yarn add share-button-links-react

Exports

Buttons

import {
  ButtonCopy,
  ButtonEmail,
  ButtonFacebook,
  ButtonLinkedIn,
  ButtonPinterest,
  ButtonPocket,
  ButtonReddit,
  ButtonTelegram,
  ButtonTumblr,
  ButtonTwitter,
  ButtonWhatsapp
} from "share-button-links-react";

Icon Buttons

import {
  CopyIcon,
  EmailIcon,
  FacebookIcon,
  LinkedInIcon,
  PinterestIcon,
  PocketIcon,
  RedditIcon,
  TelegramIcon,
  TumblrIcon,
  TwitterIcon,
  WhatsappIcon
} from "share-button-links-react";

Button Group

import { ButtonGroup } from "share-button-links-react";

Styles

The package ships with compiled CSS and the original SCSS entry.

@import "share-button-links-react/dist/share-button-links-react.css";
@use "share-button-links-react/dist/share-button-links-react.scss";

Basic Usage

import { ButtonFacebook, TwitterIcon, ButtonGroup } from "share-button-links-react";

export function Example() {
  return (
    <>
      <ButtonFacebook
        url="https://example.com/article"
        title="A shareable article"
        text="Facebook"
        hasIcon
        isRounded
        colorVariant="neutral"
      />

      <TwitterIcon
        url="https://example.com/article"
        title="A shareable article"
        isCircled
        colorVariant="flat"
      />

      <ButtonGroup
        url="https://example.com/article"
        title="A shareable article"
        message="Take a look at this"
        description="Reusable React share buttons"
        mediaUrl="https://example.com/cover.png"
        content="Extra text for Tumblr or email"
        subject="Check this out"
        isRounded
        colorVariant="neutral"
        facebookIcon
        twitterIcon
        telegramIcon
        whatsappIcon
        copyIcon
      />
    </>
  );
}

Shared Visual Props

Most button and icon components support:

  • isRounded?: boolean
  • isCircled?: boolean
  • isBordered?: boolean
  • colorVariant?: "brand" | "flat" | "neutral"

Text buttons also support:

  • hasIcon?: boolean

Icon buttons also support:

  • isAllWhite?: boolean
  • isWhited?: boolean

Copy Button Props

ButtonCopy and CopyIcon support:

  • url?: string to copy a specific URL.
  • copiedLabel?: string to customize the success message.

URL Safety Props

All share components support:

  • validateUrl?: boolean to require absolute http/https URLs.
  • fallbackUrl?: string used when validation is enabled and the provided URL is invalid.

Network-Specific Props

Some components need extra data depending on the destination:

  • title for Facebook, Twitter, Reddit, Pocket and Tumblr.
  • message for WhatsApp and Telegram.
  • description and mediaUrl for Pinterest.
  • to, subject and content for Email.
  • content for Tumblr.

Local Development

The repository includes an isolated playground outside of the library build.

npm run dev

Useful commands:

  • npm run build builds the library.
  • npm run build:playground builds the playground.
  • npm test runs the test suite.

Documentation

Documentation site: share-button-links-react-docs.vercel.app