web-share
v0.0.3
Published
Web component that wraps the web-share api
Downloads
66
Readme
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/[email protected]/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