react-native-store-badges
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

react-native-store-badges

Your one stop solution for official, same-sized, localized and multiplatform store badges in React Native.

semantic-release

Examples

Getting Started

npm install react-native-store-badges

Usage

import { StoreBadge } from "react-native-store-badges";

const MyApp = () => {
  return (
    <StoreBadge
      platform="ios"
      href="https://www.github.com" // optional
      height={60} // optional
      locale="da-DK" // optional
    />
  );
};

Props

Name Type Default Description
platform "ios" | "android" required App Store or Play Store badge
locale LocaleISO? | string? navigator.language or "en-US" Locale code
height number? 40 Height of the badge (width is calculated)
href string? URL of App Store or Play Store
target HTMLAttributeAnchorTarget? "_blank" target-attribute is only used on Web platforms
style ViewStyle? 135 Styles for the wrapping View (Be aware of badge guidelines)
customScale BadgeScale? Use to temporarily correct any issues there may be with badge sizing in a specific locale. (Read more)

Localization

Note Some locales might have different sized badges. The library attempts to handle this problem, so please create an issue or pull request, if you are experiencing this problem. To temporarily solve this problem you can provide custom scales using the customScale prop.

App Store Locales List

Play Store Locales List

Badge Guidelines

Warning Be aware of the badge guidelines when using this library.

App Store Badge Guidelines

Play Store Badge Guidelines

Known Issues

  • The App Store Badge will only load the "en-US" locale on a https connection.

Package Sidebar

Install

npm i react-native-store-badges

Weekly Downloads

6

Version

1.0.4

License

MIT

Unpacked Size

44.1 kB

Total Files

44

Last publish

Collaborators

  • reinhardtr