# react-store-badges

> react-store-badges React component

Latest version **1.5.1** (published 2020-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-store-badges
pnpm add react-store-badges
yarn add react-store-badges
bun add react-store-badges
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2020-07-03 |
| First published | 2020-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Maintainers | jbyun94 |
| Keywords | react-component |

## Links

- npm: https://www.npmjs.com/package/react-store-badges
- Repository: https://github.com/yjb94/react-store-badges
- Homepage: https://github.com/yjb94/react-store-badges#readme
- Issues: https://github.com/yjb94/react-store-badges/issues
- npm.io page: https://npm.io/package/react-store-badges

## Dependencies (2)

- [coveralls](https://npm.io/package/coveralls.md) ^3.1.0
- [codecov.io](https://npm.io/package/codecov.io.md) ^0.1.6

## Recent versions

- 1.5.1 (latest) — 2020-07-03
- 1.5.0 — 2020-05-23
- 1.4.0 — 2020-04-10
- 1.3.0 — 2020-01-23
- 1.2.2 — 2020-01-23
- 1.2.1 — 2020-01-23
- 1.2.0 — 2020-01-23
- 0.0.7-development — 2020-01-23
- 1.1.3 — 2020-01-23
- 1.1.2 — 2020-01-23
- 1.1.1 — 2020-01-22
- 1.1.0 — 2020-01-22
- 0.0.6-development — 2020-01-22
- 0.0.4-development — 2020-01-22
- 0.0.3-development — 2020-01-22
- … 3 more at https://npm.io/package/react-store-badges/versions

## README

# react-store-badges

[![Travis][build-badge]][build]
[![npm package][npm-badge]][npm]
[![Coveralls][coveralls-badge]][coveralls]

![](https://raw.githubusercontent.com/yjb94/react-store-badges/master/img/main.png)

react-store-badges is a React.js component displaying badges for App Store and Google Play Store. react-store-badge serves locale(localization) setting for each country.

react-store-badge uses SVG files, (optimized by svgo) so no worries about image going wrong.

## Getting started

```
  npm install --save react-store-badges
```

## Usage

```
  import React, {Component} from 'react'

  import ReactStoreBadges from 'react-store-badges'

  class App extends Component {
    render() {
      return <div>
        <ReactStoreBadges
          platform={'ios'}
          url={'YOUR_APP_STORE_URL'}
          locale={'en-us'}
        />

        <ReactStoreBadges
          platform={'android'}
          url={'YOUR_PLAY_STORE_URL'}
          locale={'ko-kr'}
        />
      </div>
    }
  }
```

## props

| Name         |               Type                |  Default   | Description                     |
| :----------- | :-------------------------------: | :--------: | :------------------------------ |
| **url**      |        <code>string</code>        | `required` | url of App Store and Play Store |
| **platform** | <code>'ios'&#124;'android'</code> | `required` | url of App Store and Play Store |
| **defaultLocale** | <code>string</code> | 'en-us' | default locale code |
| **locale** | <code>string</code> | 'en-us' | locale name |
| **width** | <code>number</code> | 135 | width for badge size |
| **height** | <code>number</code> | 40 | height for badge size |
| **target** | <code>'_self'&#124;'_blank'&#124;'_parent'&#124;'_top'</code> | '_self' | target for url to be opened |
## Localization

### Supported locales

[Apple locales list](https://www.apple.com/itunes/marketing-on-itunes/identity-guidelines.html#itunes-store-badges#LocalizedBadges)

[Google locales list](https://github.com/yjb94/google-play-badge-svg/tree/master/img)

### Localization tip

- iOS uses full code of their locale. (ex. en-us) and google uses short code of their locale(ex. en). So if you want your badge in only one store, you can customize it anyway.

## Badge Guidelines

please note that you have to follow the guidelines below

[Apple Badge Guidelines](https://developer.apple.com/app-store/marketing/guidelines/)

[Google Badge Guidelines](https://play.google.com/intl/en_us/badges/)

[build-badge]: https://img.shields.io/travis/yjb94/react-store-badge/master.png?style=flat-square
[build]: https://travis-ci.org/yjb94/react-store-badge
[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
[npm]: https://www.npmjs.org/package/npm-package
[coveralls-badge]: https://img.shields.io/coveralls/yjb94/react-store-badges/master.png?style=flat-square
[coveralls]: https://coveralls.io/github/yjb94/react-store-badges

---
_Source: https://npm.io/package/react-store-badges · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
