{"id":26628,"library":"vue3-social-sharing","title":"Vue 3 Social Sharing","description":"Vue 3 plugin for sharing links on social networks (Facebook, Twitter/X, LinkedIn, WhatsApp, etc.) with TypeScript support. Version 1.4.1 supports 30+ networks including Bluesky and Threads. Works as a composable, a Vue plugin with a <share-network> component, or a renderless component. Design-agnostic, no CSS included. A modern fork of vue-social-sharing (Vue 2). Peer dependency: vue ^3.3.11.","status":"active","version":"1.4.1","language":"javascript","source_language":"en","source_url":"https://github.com/hedint/vue3-social-sharing","tags":["javascript","vue","vue 3","vue3","vue plugin","social sharing","social share","social sharing plugin","vue social sharing","typescript"],"install":[{"cmd":"npm install vue3-social-sharing","lang":"bash","label":"npm"},{"cmd":"yarn add vue3-social-sharing","lang":"bash","label":"yarn"},{"cmd":"pnpm add vue3-social-sharing","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for Vue 3 plugin","package":"vue","optional":false}],"imports":[{"note":"Named export from main entry. Available as composable function.","wrong":"import { useShareLink } from 'vue3-social-sharing/src'","symbol":"useShareLink","correct":"import { useShareLink } from 'vue3-social-sharing'"},{"note":"Named export, not default. Use as renderless component with v-slot.","wrong":"import ShareNetwork from 'vue3-social-sharing'","symbol":"ShareNetwork","correct":"import { ShareNetwork } from 'vue3-social-sharing'"},{"note":"Default export for app.use(). Options object with optional networks config.","wrong":"import { Vue3SocialSharingPlugin } from 'vue3-social-sharing'","symbol":"Vue3SocialSharingPlugin","correct":"import Vue3SocialSharingPlugin from 'vue3-social-sharing'"},{"note":"shareLink is returned from the composable, not a direct export.","wrong":"import { shareLink } from 'vue3-social-sharing'","symbol":"shareLink","correct":"const { shareLink } = useShareLink()"}],"quickstart":{"code":"<script setup lang=\"ts\">\nimport { useShareLink } from 'vue3-social-sharing';\nimport { ref } from 'vue';\n\nconst { shareLink } = useShareLink();\nconst url = ref('https://example.com');\n\nconst shareOnFacebook = () => {\n  shareLink({\n    network: 'facebook',\n    url: url.value,\n    quote: 'Check this out!'\n  });\n};\n</script>\n\n<template>\n  <button @click=\"shareOnFacebook\">Share on Facebook</button>\n</template>","lang":"typescript","description":"This shows a minimal Vue 3 component using the useShareLink composable to share a URL on Facebook."},"warnings":[{"fix":"Check the list of supported networks: facebook, twitter, linkedin, etc.","message":"network property is required and must be a valid network name from the list. Case-sensitive.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Provide url and network; test share result with each network.","message":"Only the url property is required across all networks; other properties (title, description, etc.) are network-dependent and may be silently ignored.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update network names accordingly.","message":"Version 1.4.0 added Bluesky network; if you upgrade from <1.4.0, note new network names.","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Use network: 'x' instead of 'twitter'.","message":"Twitter network exists separately from X; both are valid but X is recommended.","severity":"deprecated","affected_versions":">=1.1.0"},{"fix":"Style your own buttons/spans. Use v-slot to customize.","message":"The package does not include any default styles; UI must be implemented manually.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure tsconfig.json includes 'moduleResolution': 'node' or 'bundler' and 'module': 'esnext'.","cause":"TypeScript is not configured to resolve module paths correctly.","error":"Cannot find module 'vue3-social-sharing' or its corresponding type declarations."},{"fix":"Use const { shareLink } = useShareLink() inside setup.","cause":"shareLink is not imported directly; it is returned from useShareLink composable.","error":"TypeError: shareLink is not a function"},{"fix":"If using plugin: app.use(Vue3SocialSharingPlugin). If using component: import { ShareNetwork } from 'vue3-social-sharing'.","cause":"Missing plugin registration or component import.","error":"Failed to resolve component: share-network"},{"fix":"Import ShareNetwork as named import: import { ShareNetwork } from 'vue3-social-sharing'.","cause":"TypeScript type not recognized due to incorrect import.","error":"Property 'network' does not exist on type 'ShareNetworkProps'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}