Skip to main content
Primer Checkout React Native SDK is currently in beta (v3.0.0-beta.1). The API is subject to change before the stable release.
Shape tokens set how rounded Primer’s components are, how large some of their fixed elements are and how thick their borders are. There are three groups, each overridden per mode in the theme prop of PrimerCheckoutProvider: Every token is a number in React Native layout units. You set only the tokens you want to change. The defaults are the same in light and dark mode. Set tokens for each mode under light and dark.

radii

sizes

widths

An input’s border is drawn inside the field, so a thicker border reduces the padding instead of adding height.

Override shape tokens

Pass theme to PrimerCheckoutProvider. To change the radius or border of one input only, use the borderRadius, borderWidth, focusedBorderWidth and errorBorderWidth keys of its PrimerTextInputTheme. See Card inputs.

See also

PrimerThemeOverride

Apply a theme, choose light or dark mode and read tokens with usePrimerTheme.

Color tokens

All 32 colors with their light and dark defaults.

Spacing tokens

The padding and gap scale.

Typography tokens

The brand font and the six text styles.