gatsby-plugin-pwainstall

1.1.2 • Public • Published

Description

Provides the ability to easily add a custom Add To Home Screen button with minimal markup for your Gatsby Progressive Web Application.

Formerly, gatsby-plugin-a2hs

Dependencies

gatsby-plugin-manifest
gatsby-plugin-offline

How to install

npm i gatsby-plugin-pwainstall

Usage

// In your gatsby-config.js
plugins['gatsby-plugin-pwainstall']

Optional Properties

suspend
How many days to suspend presentation following install dismissal. (default: 2)

acceptedUri
Page to redirect if install is accepted.

dismmissedUri
Page to redirect if install is dismissed.

Examples of usage

import AddToHomeScreen from 'gatsby-plugin-pwainstall'
 
export default (props) => {
    return (
        <div>
            <AddToHomeScreen suspend='2' acceptedUri='/' dismmissedUri='/'>
                Install Our App
            </AddToHomeScreen>
        </div>
    )
}

How to contribute

If this plugin was useful to you, 🍕 pizza & ☕ coffee donations are welcome.

XRP QR Code

Package Sidebar

Install

Weekly Downloads

313

Version

1.1.2

License

MIT

Unpacked Size

4.47 kB

Total Files

4

Last publish

Collaborators

  • ryanprentiss