vue-social-sharing

Release Build Status Coverage Status Downloads License vue1 vue2

A Vue.js component for sharing links to social networks

Demo:

  • Facebook
  • Google +
  • LinkedIn
  • Pinterest
  • Reddit
  • Twitter
  • VKontakte
  • Weibo
  • Whatsapp

Installation

# Yarn
yarn add vue-social-sharing

# NPM
npm install --save vue-social-sharing

# Bower
bower install vue-social-sharing

Usage

Loading the library

Browserify / Webpack
var SocialSharing = require('vue-social-sharing');
Vue.use(SocialSharing);
HTML
<script src="/dist/vue-social-sharing.min.js"></script>
</div>

Using the social sharing component

<social-sharing url="https://vuejs.org/" inline-template>
  <div>
    <network network="facebook">
      <i class="fa fa-fw fa-facebook"></i> Facebook
    </network>
    <network network="googleplus">
      <i class="fa fa-fw fa-google-plus"></i> Google +
    </network>
    <network network="linkedin">
      <i class="fa fa-fw fa-linkedin"></i> LinkedIn
    </network>
    <network network="pinterest">
      <i class="fa fa-fw fa-pinterest"></i> Pinterest
    </network>
    <network network="reddit">
      <i class="fa fa-fw fa-reddit"></i> Reddit
    </network>
    <network network="twitter">
      <i class="fa fa-fw fa-twitter"></i> Twitter
    </network>
    <network network="vk">
      <i class="fa fa-vk"></i> VKontakte
    </network>
    <network network="weibo">
      <i class="fa fa-weibo"></i> Weibo
    </network>
    <network network="whatsapp">
      <i class="fa fa-fw fa-whatsapp"></i> Whatsapp
    </network>
  </div>
</social-sharing>