@socialshares/core

0.0.22 • Public • Published

Socialshares

Socialshares v3. Work in progress.

View npm package MIT License Follow on Twitter

⚡️ Quick start

<div id="shareButtons"></div>

<script type="module">
  import {
    renderShareButtons,
    twitterButton,
    facebookButton,
  } from '//unpkg.com/@socialshares/core?module';

  const mountElement = document.getElementById('shareButtons');

  renderShareButtons(mountElement, [twitterButton(), facebookButton()]);
</script>

📦 Install

You can install via npm:

npm install @socialshares/core

Then import with a bundler like Parcel or Webpack:

import {
  renderShareButtons,
  twitterButton,
  facebookButton,
} from '@socialshares/core';

const mountElement = document.getElementById('shareButtons');

renderShareButtons(mountElement, [twitterButton(), facebookButton()]);

Make sure to add an empty element to your HTML:

<div id="shareButtons"></div>

Done! You should see a Tweet button and Facebook button rendered.

Check out the socialshares docs for more.

Package Sidebar

Install

npm i @socialshares/core

Weekly Downloads

0

Version

0.0.22

License

MIT

Unpacked Size

868 kB

Total Files

140

Last publish

Collaborators

  • sunnysingh