/gatsby-plugin-pwainstall

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

Primary LanguageJavaScriptMIT LicenseMIT

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