Skip to Content
ARCUI

ThemedView

Theme-aware ARCUI View surface with explicit background-color ownership and native View composition.

ThemedView is a native View whose background can interpolate with ARCUI's active theme while all other layout/styling remains normal React Native composition.

Theme-aware surfaces can be composed normally and can participate in ReverseTheme subtrees without changing component structure.

Usage

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

<ThemedView style={{ padding: 16, borderRadius: 12 }}>
  <Text>Theme-aware surface</Text>
</ThemedView>;

Background ownership

The background priority is:

colors.background
-> style.backgroundColor
-> colors.*.themedView.background

Fixed color

<ThemedView colors={{ background: "rgba(20,20,20,1)" }} />

The string remains fixed in both themes.

Theme-aware pair

<ThemedView
  colors={{
    background: {
      dark: "rgba(20,20,20,1)",
      light: "rgba(250,250,250,1)",
    },
  }}
/>

The pair must provide both theme endpoints to satisfy TThemeColor.

Native style-owned background

<ThemedView style={{ backgroundColor: "tomato" }} />

When colors.background is omitted, style.backgroundColor remains consumer-owned and ARCUI does not create a competing animated background property.

Example
ARCUI ThemedView animated theme color pair and fixed native background color

Composition

All non-background style fields remain normal native View styling:

<ThemedView
  style={{
    padding: 20,
    borderRadius: 16,
    gap: 12,
  }}
>
  {children}
</ThemedView>

Use ThemedView when theme-aware surface color is the requirement. Use a regular View when no ARCUI color ownership is needed.

ReverseTheme

ThemedView automatically consumes the current ARCUI theme context, including a reversed subtree:

<ReverseTheme>
  <ThemedView>
    <Text>Rendered against the opposite theme context.</Text>
  </ThemedView>
</ReverseTheme>

No special prop is required on the view itself.

Ref and native View props

ARCUI uses React 19 ref-as-prop and exposes the underlying native View. IThemedView otherwise inherits normal ViewProps, including testID, accessibility props, pointer events, layout callbacks, and style composition.

Testing

Use native testID on the root. There are no private ThemedView descendant identifiers.

API Reference

Also inherits: ViewProps

PropTypeDefaultDescription
children?ReactNode——
ref?Ref<View>—React 19 ref-as-prop. Exposes the underlying native View for measurement and other standard React Native imperative APIs.
colors?Readonly<IThemedViewColors>—Per-instance ARCUI-owned color overrides. colors.background takes priority over style.backgroundColor. When no background override is provided, style.backgroundColor remains a static native escape hatch before ARCUI falls back to ThemedView tokens.

Per-instance color slots: IThemedViewColors

PropTypeDefaultDescription
background?TThemeColor—ThemedView background color. A string is fixed across themes. A { light, dark } pair participates in ARCUI's animated theme transition.

Generated from the ARCUI 2.0.0 TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.

Generated from the ARCUI 2.0.0 TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.

Motion

When ARCUI owns the background color, light/dark interpolation follows the animated theme SharedValue on the UI thread. If native style.backgroundColor owns the property, no competing animated color is emitted.

Motion

Performance

The component flattens the incoming style once during React render to decide who owns backgroundColor. Continuous theme interpolation stays in Reanimated and does not require frame-by-frame React state.

Accessibility

ThemedView does not assign a role or create duplicate accessible content. Native View accessibility props remain available for application-specific semantics.

Theming

The dedicated token surface is:

colors.*.themedView.background

Theme motion itself follows ARCUI's animated theme system. Instance props are best reserved for true local exceptions rather than replacing design-system tokens everywhere.

On this page