Skip to Content
ARCUI

Theming

ARCUI light, dark, and system theme ownership, animated theme progress, and theme-aware composition.

ARCUI supports three provider modes:

<ARCUI theme="system">{/* application */}</ARCUI>
<ARCUI theme="light">{/* application */}</ARCUI>
<ARCUI theme="dark">{/* application */}</ARCUI>

system is the default.

Static meaning and animated progress are separate

ARCUI exposes two complementary public views of theme state:

const { theme, themeMode, tokens } = useARCUITheme();
const { themeProgress } = useARCUIAnimatedTheme();

Use theme and themeMode for React render-time meaning or structure.

Use themeProgress only when a custom visual needs continuous interpolation in Reanimated:

0 -> dark
1 -> light

Do not read themeProgress.value during normal React render.

Theme-aware color ownership

Theme-aware ARCUI components generally follow an explicit ownership priority rather than merging competing color sources.

For components such as Text and ThemedView, the model is conceptually:

fixed color prop
-> complete darkColor + lightColor pair
-> native style color/backgroundColor when it is the owning escape hatch
-> ARCUI token default

When a complete dark/light pair owns the value, ARCUI can interpolate it continuously with the shared theme progress.

Text → · ThemedView →

Custom theme-aware visuals

A custom visual can reuse ARCUI's tokens and animated progress without creating a parallel theme system:

import {
  interpolateColor,
  useAnimatedStyle,
} from "react-native-reanimated";
import {
  useARCUIAnimatedTheme,
  useARCUITheme,
} from "react-native-arc-ui";

const { tokens } = useARCUITheme();
const { themeProgress } = useARCUIAnimatedTheme();

const animatedStyle = useAnimatedStyle(() => ({
  backgroundColor: interpolateColor(
    themeProgress.value,
    [0, 1],
    [
      tokens.colors.dark.background.screen,
      tokens.colors.light.background.screen,
    ],
  ),
}));

Extract reusable token primitives before worklets where practical instead of repeatedly traversing large token objects inside frame-level code.

Reverse a subtree, not individual colors

Use ReverseTheme when a complete subtree should behave as the opposite ARCUI theme:

<ReverseTheme>
  <ThemedView>
    <Text>Opposite theme</Text>
  </ThemedView>
</ReverseTheme>

ReverseTheme derives 1 - themeProgress on the UI thread. It does not create a second provider or duplicate tokens/system state.

ReverseTheme →

Tokens vs instance props

Use tokens for application-wide design decisions:

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

Use documented component props or native style escape hatches for intentional local exceptions:

<Button radius={0}>One square Button</Button>

System theme changes

When theme="system", ARCUI follows the platform appearance reactively. If the platform temporarily reports no color scheme, ARCUI resolves to light mode.

Theme animation still respects the system Reduced Motion preference.

On this page