Skip to Content
ARCUI

Text

ARCUI-managed React Native text with animated theme color, centralized font scaling, and native TextProps escape hatches.

Text is the preferred primitive when readable content should participate in ARCUI's typography, theme-color, and Dynamic Type model.

Usage

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

<Text>Hello ARCUI</Text>;

Typography ownership

ARCUI resolves the base typography from tokens.typography.text.text, then allows valid consumer style.fontSize / style.lineHeight values to become the base metrics for that instance.

<Text style={{ fontSize: 20, fontWeight: "700" }}>
  Heading
</Text>

fontWeight, fontFamily, letterSpacing, alignment, decoration, and other normal static TextStyle fields remain native style escape hatches.

Example
ARCUI Text typography styling examples

Central font scaling

ARCUI owns readable-text scaling through its central fontScale SharedValue.

For that reason Text always renders with:

allowFontScaling={false}
maxFontSizeMultiplier={tokens.typography.maxFontSizeMultiplier}

and applies font size/line height through ARCUI scaling instead of stacking native scaling on top.

This prevents double scaling while keeping theme/font-scale transitions consistent with the rest of the library.

Line height

ARCUI does not invent a line height when neither the token nor consumer style supplies one. Native Text is allowed to use automatic line measurement.

<Text style={{ fontSize: 18 }}>
  Automatic line height
</Text>

If you explicitly provide lineHeight, ARCUI treats it as an unscaled base metric and scales it with the same font-scale SharedValue.

Malformed runtime fontSize / lineHeight values report in development and fall back safely.

Color ownership

Color priority is explicit:

colors.text
-> style.color
-> ARCUI text tokens

Fixed color

<Text colors={{ text: "rgba(255,255,255,1)" }}>Fixed</Text>

Theme-aware pair

<Text
  colors={{
    text: {
      dark: "rgba(255,255,255,1)",
      light: "rgba(20,20,20,1)",
    },
  }}
>
  Theme aware
</Text>

Use a complete { light, dark } pair for animated theme-aware overrides. A fixed string stays the same in both themes.

Native style-owned color

<Text style={{ color: "tomato" }}>
  Native style owns this color
</Text>

When colors.text is omitted, style.color owns the native color without a competing ARCUI animated color style.

Example
ARCUI Text color ownership examples

Native Text props

Text inherits React Native TextProps except allowFontScaling and maxFontSizeMultiplier, which are reserved by ARCUI's scaling model.

That includes normal props such as:

numberOfLines
ellipsizeMode
selectable
onPress
accessibilityLabel
textBreakStrategy

where supported by React Native.

Testing

Use normal native testID on the Text node. There are no ARCUI-owned descendant suffixes for this primitive.

API Reference

Also inherits: Omit< TextProps, "allowFontScaling" | "maxFontSizeMultiplier" >

PropTypeDefaultDescription
colors?Readonly<ITextColors>—Per-instance ARCUI-owned color overrides. colors.text takes priority over style.color. When no text override is provided, style.color remains a static native escape hatch before ARCUI falls back to the default Text tokens.

Per-instance color slots: ITextColors

PropTypeDefaultDescription
text?TThemeColor—Text content 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

Theme-aware color interpolation and font scaling are UI-thread driven. Text does not use React state for frame-by-frame theme or scale updates.

The native node is remounted only when line-height ownership switches between explicit and automatic measurement, avoiding stale native line-height layout without introducing a default line height.

Performance

Style flattening and ownership resolution happen during React render. The continuous theme/font-scale values remain Reanimated work, so ordinary text content does not need to rerender for every interpolation frame.

Accessibility

ARCUI keeps native Text semantics and centralizes readable text scaling. Consumer accessibility labels/roles remain available through TextProps; ARCUI does not add generic behavior strings to plain text.

Theming

Relevant token areas include:

colors.*.text.primary
typography.text.text
typography.maxFontSizeMultiplier

Use colors.text for fixed or theme-aware instance customization, and style.color when a native static style should own the value entirely.

Try it live

Explore Text interactively in Expo Snack.

Open Text in Expo Snack ↗

On this page