Infobox
Theme-aware inline message container with default, warning, and danger semantic presentations.
Infobox communicates contextual information inline without owning interaction or application state.
Usage
import { Infobox } from "react-native-arc-ui";
<Infobox>
Your profile changes are saved automatically.
</Infobox>;type="default" is the normal presentation.
Semantic types
<Infobox type="default">General information.</Infobox>
<Infobox type="warning">Review this before continuing.</Infobox>
<Infobox type="danger">This action is destructive.</Infobox>Changing type retargets the semantic border/text/icon colors directly; ARCUI does not treat the three types as positions on an ordinal animation axis.
Built-in icons
When icon is omitted, the semantic defaults are:
default -> info
warning -> alertCircle
danger -> xCircleA built-in override still uses Infobox-owned color and font-scale behavior:
<Infobox type="warning" icon="eye">
Review visibility settings.
</Infobox>Custom icon content
customIcon is mutually exclusive with icon:
<Infobox customIcon={<BrandGlyph />}>
Custom icon content
</Infobox>Custom icon content is completely consumer-owned. ARCUI does not change its color, size, accessibility, or motion.
Content ownership
Textual children are resolved into ARCUI-owned text presentation:
typography.infobox.text
central fontScale
semantic infobox text colorArbitrary non-text ReactNode content is rendered as supplied and keeps its own styling/accessibility.
Layout and native surface
Infobox renders a row-oriented native surface with token-owned border, radius, padding, and gap. style is applied last so consumers can make intentional instance-level layout/surface adjustments.
React 19 ref-as-prop exposes the native root View.
Testing
With testID="sync-info":
sync-info
sync-info-icon // built-in icon path
sync-info-text // textual content pathCustom icon/content descendants remain consumer-owned and therefore do not receive ARCUI-generated suffixes.
API Reference
Infobox Built In Icon
Also inherits: ViewProps
| Prop | Type | Default | Description |
|---|---|---|---|
| ref? | Ref<View> | — | React 19 ref-as-prop. |
| children | ReactNode | required | Infobox content. Textual ReactNode content receives ARCUI typography and accessibility font scaling. Arbitrary ReactNode content remains consumer-owned. |
| type? | TInfoboxType | "default" | Semantic Infobox presentation. |
| style? | StyleProp<ViewStyle> | — | — |
| icon? | TIconType | — | ARCUI-owned built-in icon. Its color follows the Infobox semantic type and theme. When omitted, the default icon follows the semantic type: default -> "info" warning -> "alertCircle" danger -> "xCircle" |
Infobox Custom Icon
Also inherits: ViewProps
| Prop | Type | Default | Description |
|---|---|---|---|
| ref? | Ref<View> | — | React 19 ref-as-prop. |
| children | ReactNode | required | Infobox content. Textual ReactNode content receives ARCUI typography and accessibility font scaling. Arbitrary ReactNode content remains consumer-owned. |
| type? | TInfoboxType | "default" | Semantic Infobox presentation. |
| style? | StyleProp<ViewStyle> | — | — |
| customIcon | ReactNode | required | Completely consumer-owned icon/content. ARCUI does not alter its color, size, accessibility or animation. |
Generated from the ARCUI 1.1.x TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.
The union ensures icon and customIcon cannot both own the icon slot in typed code.
Motion
Semantic color targets and active theme are independent visual dimensions. Type changes animate directly toward their new target colors; theme interpolation is applied separately. Reduced Motion snaps semantic color changes to their target.
Performance
Infobox keeps no semantic React state. Reanimated SharedValues own transient color interpolation, while token geometry and resolved content remain normal render-time work.
Accessibility
Infobox itself does not force a role because the same visual can represent neutral information, warning context, or application-specific content. Text remains normal accessible text. Built-in icons are decorative; custom icon accessibility is the consumer's responsibility.
For urgent/error announcements, model the surrounding application semantics explicitly rather than assuming visual type="danger" alone creates a live region.
Theming
Relevant token areas include:
colors.*.infobox
radius.infobox
border.infobox
spacing
typography.infobox
infoboxAnimations
animations
typography.maxFontSizeMultiplier