Skip to content
Display App Store and/or Google Play badges on your website based on the browser
HTML JavaScript
Branch: master
Clone or download
Latest commit 50d2da7 Dec 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Update react-store-badge and proxy properties names Dec 17, 2019
.babelrc Initial commit Dec 6, 2019
.gitignore Initial commit Dec 6, 2019
.npmignore Update .npmignore Dec 8, 2019
.prettierrc Add prettier Dec 6, 2019
LICENSE Add MIT License Dec 7, 2019
README.md Add demo page Dec 8, 2019
_config.yml Set theme jekyll-theme-modernist Dec 7, 2019
demo.md Add demo page Dec 8, 2019
package.json Release 1.2.2 Dec 17, 2019
preact.config.js
yarn.lock Update react-store-badge and proxy properties names Dec 17, 2019

README.md

store-badge

npm version npm bundle size License npm downloads jsDelivr

Introduction

Display App Store and/or Google Play badges on your website based on the browser.

If the browser is an iPhone or iPad, only the App Store badge will be displayed. If the browser is running on Android, only the Google Play badge will be displayed. In all other cases, both badges are shown.

Integration

<p>Download Cheerswipe now!</p>
<div
  class="store-badge"
  data-name="Cheerswipe"
  data-google-play-url="https://play.google.com/store/apps/details?id=fr.puyou.cheerswipe"
  data-app-store-url="https://apps.apple.com/us/app/cheerswipe/id1468158095?ls=1"
></div>
<script async src="https://cdn.jsdelivr.net/npm/store-badge@1/build/bundle.js"></script>

See demo

Customization

If you wish to add some CSS to the badges, you can use the classes store-badge-app-store and store-badge-google-play.

Badges are SVG so you can scale them as needed.

Legal

Apple, the Apple logo, iPhone, and iPad are trademarks of Apple Inc., registered in the U.S. and other countries and regions. App Store is a service mark of Apple Inc.

Google Play and the Google Play logo are trademarks of Google LLC.

You can’t perform that action at this time.