pwa-installdeprecated

Web Component that provides an install experience for PWAs

Usage no npm install needed!

<script type="module">
  import pwaInstall from 'https://cdn.skypack.dev/pwa-install';
</script>

README

Built With Stencil

pwa-install

pwa-install is a web component built with Stencil that brings an awesome "install" experience to your Progressive Web App! It is still early for this component, but expect lots of improvements soon!

What does it look like?

An image of what the component looks like

Using this component

Things to know:

  • pwa-install uses the beforeinstallprompt event described in these docs to know when the browser has said your PWA is installable. It will not show the install button until this event has fired. This can be worked around by using the forceshow prop described below.
  • pwa-install currently takes advantage of these parts of the w3c manifest spec: name, categories, description, screenshots

Install

Script tag

  • Put these two script tags in the head of your index.html:
  <script type="module" src="https://unpkg.com/pwa-install/dist/pwa-install/pwa-install.esm.js"></script>
  <script nomodule="" src="https://unpkg.com/pwa-install/dist/pwa-install/pwa-install.js"></script>

API

Properties

Property Attribute Description Type Default
forceshow forceshow Will always show install button boolean undefined
iconpath iconpath path to app icon string undefined
manifestpath manifestpath path to your web manifest string undefined