Simple, clean, customizable sharing buttons.
The default share buttons used by the social networks are not only ugly to look at (sorry, they just are) but they usually depend on iframes and all sorts of other horrible, slow code. That led to creating shr (short for share).
- Accessible - built right, using progressive enhancement.
- Lightweight - just 1.9KB minified and gzipped.
- Customisable - make the buttons and count look how you want with the markup you want.
- Semantic - uses the right elements. There's no
<span>as button type hacks.
- Fast - uses local storage to cache results to keep things fast.
Oh and yes, it works with Bootstrap.
Check out the changelog
- More networks
If you have any cool ideas or features, please let me know by creating an issue or of course, forking and sending a pull request.
docs/dist/docs.js for an example setup.
If you want to use our CDN, you can use the following:
<link rel="stylesheet" href="https://cdn.shr.one/1.1.1/shr.css"> <script src="https://cdn.shr.one/1.1.1/shr.js"></script>
If you want to use the default css, add the
shr.css file from /dist into your head, or even better use
shr.scss file included in
/src in your build to save a request.
<link rel="stylesheet" href="dist/shr.css">
Much of the behaviour of the player is configurable when initialising the library. Here's an example of a default setup:
<script src="dist/shr.js"></script> <script>shr.setup();</script>
If you find anything weird with Shr, please let us know using the GitHub issues tracker.
Shr costs money to run, not my time - I donate that for free but domains, hosting and more. Any help is appreciated... Donate to support Shr
Thanks to Fastly for providing the CDN services.