Web Componentand material implementation of social share buttons (facebook, twitter and google+).
Install the component using Bower:
$ bower install paper-share-buttons --save
Or download as ZIP.
Element dependencies are managed via Bower. You can install that via:
npm install -g bower
Then, go ahead and download the element's dependencies:
bower install
-
Import Web Components' polyfill:
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
-
Import Custom Elements:
<link rel="import" href="bower_components/paper-share-buttons/paper-share-facebook.html"> <link rel="import" href="bower_components/paper-share-buttons/paper-share-twitter.html"> <link rel="import" href="bower_components/paper-share-buttons/paper-share-google.html">
-
Start using it!
<paper-share-facebook></paper-share-facebook> <paper-share-twitter></paper-share-twitter> <paper-share-google></paper-share-google>
Attribute | Options | Description |
---|---|---|
href |
string | The URL displayed on the post |
raised |
boolean | Apply raised property to paper-button |
noink |
boolean | Apply noink property to paper-button |
Attribute | Options | Description |
---|---|---|
text |
string | The text displayed on the tweet |
href |
string | The URL displayed on the tweet |
user |
string | The user displayed on the tweet and in the @mention |
raised |
boolean | Apply raised property to paper-button |
noink |
boolean | Apply noink property to paper-button |
Attribute | Options | Description |
---|---|---|
href |
string | The URL displayed on the post |
raised |
boolean | Apply raised property to paper-button |
noink |
boolean | Apply noink property to paper-button |
If you wish to work on your element in isolation, we recommend that you use Polyserve to keep your element's bower dependencies in line. You can install it via:
npm install -g polyserve
And you can run it via:
polyserve
Once running, you can preview your element at
http://localhost:8080/components/paper-share-buttons/
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT License © Guilherme Rv Coelho