npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-mobile-app-button

v1.2.18

Published

Discover our versatile React component designed to effortlessly integrate download buttons for iOS App Store, Google Play Store, and Huawei AppGallery. With our component, you can easily enhance user experience by providing seamless access to your mobile

Downloads

2,661

Readme

React Component for iOS App Store, Google Play, and Huawei AppGallery Download Buttons

Welcome to our versatile React component designed to seamlessly integrate download buttons for iOS App Store, Google Play Store, and Huawei AppGallery. Enhance your users' experience by providing effortless access to your mobile app on popular platforms. Elevate your app's visibility and accessibility today!

Explore the Documentation: Documentation

Support Us on Ko-fi

Installation

You can install this package using npm:

npm install react-mobile-app-button

Or, if you prefer Yarn:

yarn add react-mobile-app-button

Once installed, you'll have access to App Store, Google Play, and AppGallery download buttons for your web page, as shown below:

iOS App Store Button Google Play Store Button

Usage

Here's an example of how to use our component in your React application:

import { GooglePlayButton } from "react-mobile-app-button";

export const MyComponent = () => {
  const APKUrl = "https://play.google.com/store/apps/details?id=host";

  return (
    <div>
      <GooglePlayButton
        url={APKUrl}
        theme={"light"}
        className={"custom-style"}
      />
    </div>
  );
};

You can also import multiple buttons at once and arrange them as needed:

import {
  GooglePlayButton,
  AppGalleryButton,
  ButtonsContainer,
} from "react-mobile-app-button";

export const MyComponent = () => {
  const APKUrl = "https://play.google.com/store/apps/details?id=host";
  const IOSUrl = "https://apps.apple.com/us/app/expo-go/id982107779";

  return (
    <ButtonsContainer>
      <GooglePlayButton
        url={APKUrl}
        theme={"light"}
        className={"custom-style"}
      />

      <AppGalleryButton
        url={IOSUrl}
        theme={"light"}
        className={"custom-style"}
      />
    </ButtonsContainer>
  );
};

Props

| Name | Component | Type | Description | | --------- | -------------------------------------------------------- | ---------------- | --------------------------------- | | url | GooglePlayButton, AppGalleryButton, AppStoreButton | string | Store URL | | theme | GooglePlayButton, AppGalleryButton, AppStoreButton | "dark" / "light" | Button Theme | | className | GooglePlayButton, AppGalleryButton, AppStoreButton | string | For manual styling | | title | GooglePlayButton, AppGalleryButton, AppStoreButton | string | For custom message | | height | GooglePlayButton, AppGalleryButton, AppStoreButton | number | For manual styling | | width | GooglePlayButton, AppGalleryButton, AppStoreButton | number | For manual styling | | gap | ButtonsContainer | number | Control the space between buttons | | direction | ButtonsContainer | "row" / "column" | Control flex direction |

Installation and Running the Project

To install and run the project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/GhassenEljday/react-mobile-app-button.git
  2. Install the dependencies:

    npm install
  3. Run the project using Storybook:

    npm run storybook

Getting Help

If you encounter any issues or have questions, please don't hesitate to reach out to us:

We're here to assist you in making the most of our React component.