Coder Social home page Coder Social logo

ghasseneljday / react-mobile-app-button Goto Github PK

View Code? Open in Web Editor NEW
39.0 1.0 4.0 3.07 MB

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!

Home Page: https://www.npmjs.com/package/react-mobile-app-button?activeTab=readme

JavaScript 29.59% TypeScript 70.41%
app app-gallery app-store button google-play google-play-store react react-native store app-download-cta

react-mobile-app-button's Introduction

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.

react-mobile-app-button's People

Contributors

cronchie avatar dependabot[bot] avatar frani avatar ghasseneljday avatar kaustabhws avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-mobile-app-button's Issues

Missing icon

image

Hi, I'm using the package but a problem happens when I'm trying to use the demo code provided in the document.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.