> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Design Tokens Explorer — React Native

> Explore PrimerThemeOverride tokens and see which components they affect, with live TypeScript code generation.

Explore how `PrimerThemeOverride` tokens affect different parts of Primer Checkout on React Native. Select a token to see which components it impacts, adjust values with sliders and color pickers, and copy the generated TypeScript code into your project.

> [!NOTE]
>
> This explorer shows a subset of the tokens in `PrimerThemeOverride`, with their light mode defaults. For a complete reference, see the [React Native Color tokens](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/api/theming/color-tokens.md) page.

React Native Preview

Pay with card

Cancel

Card Number

4242 4242 4242 4242

Expiry Date

MM/YY

CVV

123

Name on card

Full name

Pay

Generated TypeScript Code

<pre />

Affected

Selected

***

## How to Use

1. **Token → Components mode**: Click a token to see which parts of the checkout it affects (highlighted in green)
2. **Component → Tokens mode**: Click a component to see which tokens control its appearance
3. **Adjust values**: Use the sliders and color pickers to preview changes in real time
4. **Copy generated code**: The TypeScript code updates live — copy it into your project

Some colors follow others, as they do in the SDK. Changing `colors.brand` also changes the focus border, and changing `colors.backgroundPrimary` also changes the input fill and the Pay button label, unless you set those tokens too. The generated code lists only the tokens you changed. See [Tokens that follow others](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/api/theming/color-tokens.md#tokens-that-follow-others).

***

## Applying Tokens in Your Code

Once you've configured your theme, pass it to the `theme` prop of `PrimerCheckoutProvider`. It styles every Primer component inside the provider:

```tsx theme={"dark"}
import { PrimerCheckoutProvider, PrimerCheckoutSheet } from '@primer-io/react-native';
import type { PrimerThemeOverride } from '@primer-io/react-native';

const theme: PrimerThemeOverride = {
  light: {
    colors: { brand: '#6c5ce7' },
    spacing: { small: 10, medium: 14 },
    radii: { medium: 12 },
  },
};

type CheckoutProps = { clientToken: string; visible: boolean; onClose: () => void };

export function Checkout({ clientToken, visible, onClose }: CheckoutProps) {
  return (
    <PrimerCheckoutProvider clientToken={clientToken} theme={theme}>
      <PrimerCheckoutSheet visible={visible} onRequestDismiss={onClose} />
    </PrimerCheckoutProvider>
  );
}
```

> [!NOTE]
>
> `light` applies in light mode only. To theme dark mode, set the same groups under `dark`. Any token you leave out of `dark` uses Primer's dark default, not your light value. See [PrimerThemeOverride](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/api/theming/primer-theme-override.md).

***

## Related

* [PrimerThemeOverride](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/api/theming/primer-theme-override.md) — Theming API reference
* [Card Form Layout Builder](https://primer.io/docs/checkout/primer-checkout/build-your-ui/card-form-layout-builder.md) — Build card form layouts
* [Component Architecture Explorer](https://primer.io/docs/checkout/primer-checkout/build-your-ui/component-architecture-explorer-react-native.md) — Explore the component and hook hierarchy


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.