react-sharingbuttons
Lightweight social sharing buttons for React.
Installation
or alternatively:
Usage
NOTE
If you care about your bundle size, you can import each button separately.
Import predefined css:
Overriding styles
You can customize buttons further to meet your needs. For example, following html will be rendered for Twitter
button:
Available buttons and its props
common props:
text
- text which is displayed inside button, default to button name.onClick
- onClick event passed toa
tag.
button specific props:
text , url , subject |
|
text , url |
|
text , url |
|
text , url , shareText (a pin description), mediaSrc |
|
text , url |
|
text , url , shareText (a tweet text), |
|
Tumblr | text , url , title , caption , content |