Skip to Content
ARCUI

ReverseTheme

Render an ARCUI subtree against the opposite animated theme without creating a second design system.

ReverseTheme inverts ARCUI's animated theme progress for its descendants.

import {
  Button,
  ReverseTheme,
  Text,
  ThemedView,
} from "react-native-arc-ui";

<ReverseTheme>
  <ThemedView>
    <Text>Opposite theme, same ARCUI contracts.</Text>
    <Button type="border">Continue</Button>
  </ThemedView>
</ReverseTheme>;

If the surrounding animated theme progress is 0, descendants receive 1; if it is 1, descendants receive 0.

Composition, not manual recoloring

Use ReverseTheme when an entire subtree should behave as the opposite ARCUI theme.

That lets descendants keep their normal token and component logic instead of manually swapping individual colors.

Good uses include:

  • a dark promotional panel inside a light screen;
  • a light preview card inside a dark screen;
  • a theme-inverted demo or branded content island.

It only replaces animated theme context

ReverseTheme does not create a second ARCUI provider and does not duplicate tokens, strings, safe-area values, icons, or overlay infrastructure.

It supplies descendants with a derived animated theme progress:

reversedThemeProgress = 1 - themeProgress

That derivation stays on the UI thread through Reanimated.

Nesting

ReverseTheme is nestable:

ARCUI theme
-> ReverseTheme         = opposite
-> ReverseTheme again   = original

Reduced Motion

ReverseTheme follows the parent ARCUI theme transition. The provider already resolves Reduced Motion behavior for that shared progress, so the reversed subtree does not need a second motion policy.

Public API

PropTypeDescription
childrenReactNodeSubtree rendered against the opposite ARCUI animated theme.

Use ReverseTheme only inside an ARCUI provider.

Try it live

Explore ReverseTheme interactively in Expo Snack.

Open ReverseTheme in Expo Snack ↗

On this page