2.0.5 • Published 7 years ago
socialshares v2.0.5
⚡️ Quick start
<div id="socialshares"></div>
<script type="module">
import socialshares, { twitterButton } from '//unpkg.com/socialshares';
const mountElement = document.getElementById('socialshares');
socialshares(mountElement, { buttons: [twitterButton()] });
</script>
📦 Install
You can install via npm:
npm install socialshares
Then import with a bundler like Parcel or Webpack:
import socialshares, { twitterButton } from 'socialshares';
const mountElement = document.getElementById('socialshares');
socialshares(mountElement, { buttons: [twitterButton()] });
Make sure to add an empty element to your HTML:
<div id="socialshares"></div>
Done! You should see a Tweet button rendered.
Check out the socialshares docs for more.
💻 Development
- Install dependencies:
npm install
- Launch watcher and demo:
npm run dev
🚀 Distributing
npm run build
- TODO...
👥 Credits
- Package bundled with Microbundle
- Icons from Simple Icons