Skip to content

A Nuxt Component to handle sharing content, using Navigator.share() by default, falling back to a 3rd party solution.

Notifications You must be signed in to change notification settings

Galexia-Agency/nuxt-component-share

Repository files navigation

Galexia Nuxt Component Share

This component is a wrapper around the Vue Social Sharing component. It defaults to the Navigator.share() method that's available natively in some browsers. If Navigator.share() is not available, we use Vue Social Sharing instead.

Install

We assume you have a Nuxt project.

yarn add https://github.com/Galexia-Agency/nuxt-component-share
// plugins/galexia/nuxt-components/share.js
import Vue from 'vue'
import Galexia_NuxtComponent_Share from 'nuxt-component-share/index.vue'

Vue.component('GalexiaShare', Galexia_NuxtComponent_Share)
// nuxt.config.js
...
plugins: [
  '~plugins/galexia/components/share.js'
],
...

Use it like so

// pages/index.js
<GalexiaShare
  title="Page Title"
  titleText="Share Options:"
  description="Page Description"
/>

About

A Nuxt Component to handle sharing content, using Navigator.share() by default, falling back to a 3rd party solution.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages