Skip to content

royalfig/share-button

Repository files navigation

Sharing Is Caring Web Component

Use this web component to add a button for sharing the current page to social media (Twitter/X, Facebook, LinkedIn) or copying the URL.

Installation

There are two ways to add your share button to the page.

  1. Use the CDN

Add the following script tag to your head.

<script defer src="https://unpkg.com/@royalfig/share-button/dist/share-button.umd.js"></script>
  1. Install with NPM
npm install @royalfig/share-button

Docs

For customization and advanced usage, see the official docs