Gathering detailed insights and metrics for @thomaswu/vue-social-sharing
Gathering detailed insights and metrics for @thomaswu/vue-social-sharing
Gathering detailed insights and metrics for @thomaswu/vue-social-sharing
Gathering detailed insights and metrics for @thomaswu/vue-social-sharing
vue-social-sharing adaptions by https://github.com/nicolasbeauvais/vue-social-sharing
npm install @thomaswu/vue-social-sharing
Typescript
Module System
Node Version
NPM Version
JavaScript (95.03%)
CSS (3.4%)
Smarty (0.83%)
HTML (0.74%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
253 Commits
1 Watchers
1 Branches
30 Contributors
Updated on Oct 30, 2020
Latest Version
3.0.3-2
Package Id
@thomaswu/vue-social-sharing@3.0.3-2
Unpacked Size
46.72 kB
Size
12.65 kB
File Count
12
NPM Version
6.14.5
Node Version
12.18.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
29
Renderless components give you the highest possible control over your markup and styling. This means that vue-social-sharing
ship with minimal HTML and no CSS to let you adapt the look and feel of the components to your needs. You can learn more about renderless components in this blog article by @adamwathan.
Before using this package it is important to understand how Social Networks handle sharing links on their platform. When you share a link on a Social Network, the Social Network will crawl the link to detect Open Graph meta tags. If you share links that do not contain Open Graph meta tags, the Social Network will not be able to display a rich content for your link. You can refer to the Available properties section of the documentation to check which Social Network accept which properties without Open Graph tags.
1# Yarn 2yarn add vue-social-sharing 3 4# NPM 5npm install --save vue-social-sharing
1import VueSocialSharing from 'vue-social-sharing' 2 3Vue.use(VueSocialSharing);
1// In your nuxt.config.js file: 2modules: [ 3 'vue-social-sharing/nuxt' 4]
1<script src="/dist/vue-social-sharing.js"></script>
1<ShareNetwork 2 network="facebook" 3 url="https://news.vuejs.org/issues/180" 4 title="Say hi to Vite! A brand new, extremely fast development setup for Vue." 5 description="This week, I’d like to introduce you to 'Vite', which means 'Fast'. It’s a brand new development setup created by Evan You." 6 quote="The hot reload is so fast it\'s near instant. - Evan You" 7 hashtags="vuejs,vite" 8 > 9 Share on Facebook 10</ShareNetwork>
The url
is the only property required for all networks.
Name | Data Type | Description |
---|---|---|
tag | String | HTML tag used to render the network component. Default to "a" tag. |
popup.width | Number | Custom width of the popup window. Default to 626px. |
popup.height | Number | Custom height of the popup window. Default to 426px. |
Prop | Type | Description |
---|---|---|
url | String | URL to share. |
title | String | Sharing title (if available). |
description | String | Sharing description (if available). |
quote | String | Facebook quote (Facebook only). |
hashtags | String | A list of comma-separated hashtags (Twitter and Facebook). |
twitter-user | String | Twitter user (Twitter only). |
media | String | Url to a media (Pinterest, VK, Weibo, and Wordpress). |
Network | url | title | description | Extras/Comments |
---|---|---|---|---|
Baidu | :heavy_check_mark: | :heavy_check_mark: | :x: | |
Buffer | :heavy_check_mark: | :heavy_check_mark: | :x: | |
:heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | ||
EverNote | :heavy_check_mark: | :heavy_check_mark: | :x: | |
:heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | hashtags A list of comma-separated hashtags, only the first one will be used.quote Facebook quote. | |
:heavy_check_mark: | :heavy_check_mark: | :x: | ||
HackerNews | :heavy_check_mark: | :heavy_check_mark: | :x: | |
InstaPaper | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
Line | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
:heavy_check_mark: | :x: | :x: | ||
Odnoklassniki | :heavy_check_mark: | :heavy_check_mark: | :x: | |
:heavy_check_mark: | :heavy_check_mark: | :x: | media URL of an image describing the content. | |
:heavy_check_mark: | :heavy_check_mark: | :x: | ||
:heavy_check_mark: | :heavy_check_mark: | :x: | ||
Skype | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
SMS | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
StumbleUpon | :heavy_check_mark: | :heavy_check_mark: | :x: | |
Telegram | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
Tumblr | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
:heavy_check_mark: | :heavy_check_mark: | :x: | hashtags A list of comma-separated hashtags.twitter-user Twitter user to mention. | |
Viber | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
VK | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | media URL of an image describing the content. |
:heavy_check_mark: | :heavy_check_mark: | :x: | media URL of an image describing the content. | |
:heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | ||
Wordpress | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | media URL of an image describing the content. |
:heavy_check_mark: | :heavy_check_mark: | :x: | ||
Yammer | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
For the networks: Line
, Skype
, SMS
, Telegram
, Viber
, WhatsApp
and Yammer
; the shared content is a string of the form: "$title
$url
$description
"
Events that are emitted on the vue $root instance:
Name | Data | Description |
---|---|---|
share_network_open | Network name, shared url | Fired when a sharing popup is open |
share_network_change | Network name, shared url | Fired when the user open a new sharing popup while another is already open |
share_network_close | Network name, shared url | Fired when a sharing popup is closed or changed by another popup |
You can listen to a vue-social-sharing
$root event by using the following code:
1Vue.$root.$on('share_network_open', function (network, url) { 2 // your event code 3});
Events that are emitted on the local vue-social-sharing
instance:
Name | Data | Description |
---|---|---|
open | Network name, shared url | Fired when a sharing popup is open |
change | Network name, shared url | Fired when the user open a new sharing popup while another is already open |
close | Network name, shared url | Fired when a sharing popup is closed or changed by another popup |
You can listen to a ShareNetwork
local event by using the following code:
1<ShareNetwork @open="open" @change="change" @close="close" />
Note that the
share_network_close
event will not be fired for the WhatsApp, SMS and Email sharers.
In version 3.x
you can extend and override the list of available networks. You can see a working example of the feature in the examples/index.js
file:
1import Vue from 'vue' 2import VueSocialSharing from '@/vue-social-sharing' 3 4Vue.use(VueSocialSharing, { 5 networks: { 6 fakeblock: 'https://fakeblock.com/share?url=@url&title=@title' 7 } 8}) 9 10new Vue({ 11 el: '#app', 12})
You can extend the list of available networks directly in your nuxt.config.js
file:
1modules: [ 2 ['vue-social-sharing/nuxt', { 3 networks: { 4 fakeblock: 'https://fakeblock.com/share?url=@url&title=@title' 5 } 6 }], 7]
If needed, you can set a custom width and height for the popup window:
1<ShareNetwork :popup="{width: 400, height: 200}" />
Feel free to open an issue to ask for a new social network support.
Detailed changes for each release can be found in CHANGELOG.md.
Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
Please make sure to read the Contributing Guide before making a pull request.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Reason
128 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More