store-badge

1.3.0 • Public • Published

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

Target

If you want to open the store page in a new tab (this is mostly useful on desktop), add:

data-target="_blank"

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.0
    21
    • latest

Version History

Package Sidebar

Install

npm i store-badge

Weekly Downloads

21

Version

1.3.0

License

MIT

Unpacked Size

212 kB

Total Files

6

Last publish

Collaborators

  • apuyou