Skip to main content

Add to Wallet button

<AddPassButton /> renders the official, platform-native button:

import { AddPassButton } from '@reeq/react-native-passkit';

<AddPassButton
variant={{ ios: 'dark-outline', android: 'primary' }}
onPress={handleAddPass}
/>;
PlatformVariantsDefault
iOSdark, dark-outlinedark
Androidprimary, condensedprimary

On Android, Google only allows the black button, in two styles:

  • primary: "Add to Google Wallet" on one line.
  • condensed: the same text on two lines, for narrow layouts.

:::note Upgrading from the "Save to Google Pay" button The Android variants dark, light and light-outline belong to the old Save to Google Pay button, which Google has retired. They still work, but all of them now render primary, and development builds log a deprecation warning. Switch to primary or condensed. :::

Size​

Default sizes:

Default size
iOS260×60
Android primary288×48
Android condensed200×53

Override them with style. The artwork scales to fit and keeps its proportions:

import { Platform } from 'react-native';

<AddPassButton
onPress={handleAddPass}
style={{
height: Platform.select({ android: 48, ios: 60 }),
width: Platform.select({ android: 288, ios: 260 }),
}}
/>;

Follow the brand guidelines for sizing and clear space: