Nuxt Social Share
Getting Started

Installation

How to quickly add Nuxt Social Share to your Nuxt project.
  1. Add @stefanobartoletti/nuxt-social-share dependency to your project:
npx nuxi@latest module add nuxt-social-share
  1. Nuxi should have already added @stefanobartoletti/nuxt-social-share to the modules section of nuxt.config. If not, add it manually:
nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@stefanobartoletti/nuxt-social-share'
  ],
})
  1. Add your website base URL to the module options:
nuxt.config.ts
export default defineNuxtConfig({
  // module options
  socialShare: {
    baseUrl: 'https://www.yoursite.com' // required!
    // other optional module options
  }
})
  1. Use the <SocialShare> component wherever you need it in your app:
<SocialShare network="facebook" :styled="true" />
That's it, this is all that is required to start using Nuxt Social Share!

© 2023-present Stefano Bartoletti