---
url: /api/renderers/react-native/src/functions/tokensForScheme.md
---
[pantoken-root](../../../../index.md) / [renderers/react-native/src](../index.md) / tokensForScheme

# Function: tokensForScheme()

> **tokensForScheme**(`scheme`): `Record`<`string`, [`RNTokenValue`](../type-aliases/RNTokenValue.md)>

Experimental

Select the token object for a colour scheme (pair with RN's `useColorScheme`).

## Parameters

### scheme

`"light"` | `"dark"` | `null` | `undefined`

## Returns

`Record`<`string`, [`RNTokenValue`](../type-aliases/RNTokenValue.md)>

## Example

```tsx
import { useColorScheme } from "react-native";
import { tokensForScheme } from "@pantoken/react-native";

const t = tokensForScheme(useColorScheme());
const styles = { card: { backgroundColor: t.colorBackgroundBase, padding: t.spacingSpaceMd } };
```
