/web-share

Web component built with Stencil that makes the web share api trivial to use.

Primary LanguageJavaScriptMIT LicenseMIT

Built With Stencil

web-share

web-share is a web component that makes it super easy to use the web share api.

API

  • url(string): the url you want to share to someone
  • text(string): text you would like to share
  • title(string): the title you would like to share

Using this component

Usage example

<web-share title='web fundamentals' text='Check out Web Fundamentals — it rocks!' url='https://developers.google.com/web'>share</web-share>

Script tag

  • Put a script tag similar to this <script src='https://unpkg.com/web-share@0.0.2/dist/webshare.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Node Modules

  • Run npm install my-name --save
  • Put a script tag similar to this <script src='node_modules/web-share/dist/webshare.js></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

In a stencil-starter app

  • Run npm install web-share --save
  • Add { name: 'web-share' } to your collections
  • Then you can use the element anywhere in your template, JSX, html etc