Skip to content

Repository files navigation

react-mobile-app-button

A react component that allows you to place an iOS App Store, Google Play Store and Huawei AppGallery Download button!

Install

install using npm

npm i react-mobile-app-button

or:

yarn add react-mobile-app-button

You will get an App Store, Google Play and AppGallery download button on Web page looks like this:

imageimage

Usage

Example Code:

import{GooglePlayButton}from"react-mobile-app-button";exportconstMyComponent=()=>{constAPKUrl="https://play.google.com/store/apps/details?id=host.exp.exponent";return(<div><GooglePlayButtonurl={APKUrl}theme={"light"}className={"custom-style"}/></div>);};

You can also import more than one button in a row:

import{GooglePlayButton,AppGalleryButton,ButtonsContainer,}from"react-mobile-app-button";exportconstMyComponent=()=>{constAPKUrl="https://play.google.com/store/apps/details?id=host.exp.exponent";constiOSUrl="https://apps.apple.com/us/app/expo-go/id982107779";return(<ButtonsContainer><GooglePlayButtonurl={APKUrl}theme={"light"}className={"custom-style"}/><AppGalleryButtonurl={iOSUrl}theme={"light"}className={"custom-style"}/></ButtonsContainer>);};

props

NameComponentTypeDescription
urlGooglePlayButton, AppGalleryButton, AppStoreButtonstringStore URL
themeGooglePlayButton, AppGalleryButton, AppStoreButton"dark" / "light"Button Theme
classNameGooglePlayButton, AppGalleryButton, AppStoreButtonstringFor manually styling
heightGooglePlayButton, AppGalleryButton, AppStoreButtonnumberFor manually styling
widthGooglePlayButton, AppGalleryButton, AppStoreButtonnumberFor manually styling
gapButtonsContainernumberControl the space between buttons
directionButtonsContainer"row" / "column"Control flex direction

About

A react component that allows you to place an iOS App Store, Google Play Store and Huawei AppGallery Download button!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages