Overview
The Svelte Share Buttons Component is a simple Svelte-based share buttons component that does not track user activity. It is based on the HTML share buttons from the GitHub repository mxstbr/sharingbuttons.io.
Features
- No tracking: The component does not track user activity.
- Easy installation: Can be installed using npm and integrated with Sapper or other Svelte bundlers.
- Demo app available: A basic demo app is available on GitHub for reference.
- Pinterest support: Requires a media tag with a valid image URL for Pinterest sharing.
Installation
To install the Svelte Share Buttons Component, you can follow these steps:
Using npm
- Open your terminal and navigate to your project directory.
- Run the following command:
npm install svelte-share-buttons-component
Sapper or Other Svelte Bundler
- In your Sapper project, install the package as a dev module by running:
npm install -D svelte-share-buttons-component - Make sure to install it as a dev module to ensure proper compilation. Installing it as a runtime dependency may result in server-side errors. Refer to the provided explanation for more details.
Pure JS Example
You can find a working example of the Svelte Share Buttons Component here.
Summary
The Svelte Share Buttons Component is a lightweight and privacy-focused option for adding share buttons to your Svelte projects. It offers easy installation, does not track user activity, and includes support for Pinterest sharing. A demo app and installation guide are available for quick reference.