Skip to Content
ARCUI

Tokens

ARCUI's top-level design-system configuration for color, typography, geometry, safe area, and motion.

ARCUI is tokens-first. Reusable design decisions belong to the provider's token configuration instead of being re-declared across individual component instances.

import { defaultTokens } from "react-native-arc-ui";

Built-in namespaces

defaultTokens contains these public top-level namespaces:

colors
radius
border
typography
spacing
safeArea
sizings
zIndex
animations
pressAnimation
springConfig
enteringExiting
dialogAnimations
accordionAnimations
infoboxAnimations
fluidViewAnimations
headerAnimations
modalAnimations
selectAnimations
tabsAnimations
dropdownAnimations
progressBarAnimations
checkboxAnimations
radioAnimations
toggleAnimations
toastAnimations
skeletonAnimations
sliderAnimations
spinnerLoaderAnimations

Shallow top-level overrides

ARCUI does not recursively deep-merge built-in token namespaces.

import { ARCUI, defaultTokens, type TTokensOverride } from "react-native-arc-ui";

const tokens = {
  radius: {
    ...defaultTokens.radius,
    button: 14,
  },
} satisfies TTokensOverride;

<ARCUI tokens={tokens}>{children}</ARCUI>;

Supplying radius means this object is the complete resolved radius namespace for that provider mount.

This keeps ownership explicit and lets TypeScript verify that built-in token namespaces remain complete.

Token configuration is not application state

Tokens are resolved once per ARCUI mount.

Use them for product-wide design-system decisions such as:

  • semantic light/dark colors;
  • typography styles;
  • spacing and geometry;
  • component sizing;
  • safe-area policy;
  • z-index ordering;
  • motion language.

Do not create changing token objects as a substitute for normal React state. If the entire design-system configuration genuinely needs to change, remount the provider intentionally.

Colors

import { Colors, ColorsLight, ColorsDark } from "react-native-arc-ui";

ARCUI's owned colors are expressed consistently as rgba(...) values so Reanimated can interpolate theme-aware colors predictably.

Prefer semantic component color slots over scattering literals throughout application code.

For example, the screen surface comes from:

tokens.colors.light.background.screen
tokens.colors.dark.background.screen

while a Button resolves from its own button tone, presentation, and interaction-state token palette.

ARCUI 2.0.0 uses component-owned semantic colors rather than a top-level colors.states namespace. For example, Button tokens are grouped by primary, secondary, neutral, and danger tones; each tone contains solid, border, and transparent presentations. Checkbox, Radio, and Toggle expose their own error colors.

The public TThemeColor type supports a fixed string or a complete { light, dark } pair. Per-instance colors props override individual visual slots, while provider tokens remain the application-wide source of design defaults.

Colors API →

Typography

import { Typography, type TTypographyStyle } from "react-native-arc-ui";

Typography fontSize values are unscaled base metrics. ARCUI multiplies them by the centralized runtime fontScale.

Applicable React Native TextStyle properties such as fontFamily, fontWeight, fontStyle, fontVariant, letterSpacing, and textTransform may live in typography slots.

Semantic theme colors do not belong in typography tokens.

Typography →

Spacing

import { Spacing } from "react-native-arc-ui";
TokenpxScale
xxs4
xs8
s12
m16
l20
xl24
xxl28
xxxl32

Radius, border, sizing, and z-index

import {
  Radius,
  Border,
  Sizings,
  ZIndex,
} from "react-native-arc-ui";

These namespaces define reusable geometry and structural values owned by ARCUI components.

Use documented component props as local escape hatches when one instance intentionally differs from the product-wide token decision.

Safe-area policy

import { SafeArea, type TSafeAreaOffset } from "react-native-arc-ui";

Each supported edge follows this contract:

false -> ignore the runtime device inset
0     -> use only the runtime device inset
N     -> runtime device inset + N

Safe-area token groups exist for:

screen
header
modal
dropdown
toast
dialog

The device insets themselves come from the provider's safeAreaInsets prop.

Safe area & overlays →

Motion token hierarchy

ARCUI separates general timing from specialized behavior:

animations
-> global duration/easing + enter/exit fallback

component animation namespace
-> component-specific duration/easing + behavior
-> falls back to animations where its contract allows

pressAnimation
-> shared press feedback defaults

springConfig
-> gesture-based spring configuration

enteringExiting
-> shared default presence transitions

Examples of component namespaces include modalAnimations, tabsAnimations, sliderAnimations, toastAnimations, and spinnerLoaderAnimations.

Reduced Motion takes precedence over decorative animation configuration.

Motion →

Custom application namespaces

ARCUI's generic token types can carry your own top-level namespaces without weakening the built-in types.

import { View } from "react-native";
import {
  ARCUI,
  type TTokensOverride,
  useARCUITheme,
} from "react-native-arc-ui";

type AppTokens = {
  brand: {
    heroGap: number;
  };
};

const tokens = {
  brand: {
    heroGap: 28,
  },
} satisfies TTokensOverride<AppTokens>;

function App() {
  return (
    <ARCUI<AppTokens> tokens={tokens}>
      <Content />
    </ARCUI>
  );
}

function Content() {
  const { tokens } = useARCUITheme<AppTokens>();
  return <View style={{ gap: tokens.brand.heroGap }} />;
}

Use the same custom token type at both provider and useARCUITheme<TCustom>() boundaries.

On this page