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.
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:
color
-> complete darkColor + lightColor pair
-> style.color
-> ARCUI text tokensFixed color
<Text color="rgba(255,255,255,1)">Fixed</Text>Theme-aware pair
<Text
darkColor="rgba(255,255,255,1)"
lightColor="rgba(20,20,20,1)"
>
Theme aware
</Text>Both theme colors must be supplied. An incomplete pair is ignored and reports in development.
Native style-owned color
<Text style={{ color: "tomato" }}>
Native style owns this color
</Text>When style.color owns color, ARCUI intentionally avoids creating a competing animated color style.
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
textBreakStrategywhere 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"
>
| Prop | Type | Default | Description |
|---|---|---|---|
| color? | string | — | Fixed text color used in both themes. Takes priority over darkColor/lightColor and style.color. |
| darkColor? | string | — | Dark-theme text color override. Both darkColor and lightColor must be provided. An incomplete pair is ignored. Ignored when color is provided. |
| lightColor? | string | — | Light-theme text color override. Both darkColor and lightColor must be provided. An incomplete pair is ignored. Ignored when color is provided. |
Generated from the ARCUI 1.1.x 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.maxFontSizeMultiplierUse color for a true fixed exception, a complete dark/light pair for theme-aware instance customization, and style.color when native style should own the value entirely.
Try it live
Explore Text interactively in Expo Snack.