Nuxt Social Share
Getting Started

Module Options

Customize Nuxt Social Share according to your needs.

Nuxt Social Share provides some module options that you can set to customize it according to your needs. You must set them by using the socialShare key inside your nuxt-config:

nuxt.config.ts
export default defineNuxtConfig({
  // module options
  socialShare: {
    baseUrl: 'https://www.yoursite.com' // required!
    // other optional module options
  }
})

Options

NameRequiredTypeDefaultNotes
baseUrlYesString''This is the base URL of your website, likely the address of the homepage. It is required, all URLs to be shared will be built as relative paths to this. You can also use an enviromment variable.
styledNoBooleanfalseWhether the <SocialShare> components should be styled or not. It is false by default to allow for easier integration in any UI ✳️.
labelNoBooleantrueWhether the text label in the <SocialShare> components should be rendered or not ✳️.
iconNoBooleantrueWhether the icon in the <SocialShare> components should be rendered or not ✳️.
Options marked with ✳️ can also be set on a single component level via props. Anyway, it is usually better to set them from the module options to create your defaults, and override it with props only if needed.

© 2023-present Stefano Bartoletti