Skip to Content
ARCUI

Infobox

Theme-aware inline message container with info, success, warning, and danger tones.

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>;

tone="info" is the default presentation.

Semantic tones

<Infobox tone="info">General information.</Infobox>
<Infobox tone="success">Changes saved.</Infobox>
<Infobox tone="warning">Review this before continuing.</Infobox>
<Infobox tone="danger">This action is destructive.</Infobox>
Example
ARCUI Infobox semantic tones

Changing tone retargets the surface, border, text, and icon colors directly; ARCUI does not treat semantic tones as an ordinal animation axis.

Motion

Built-in icons

When icon is omitted, the semantic defaults are:

info    -> info
success -> check
warning -> alertCircle
danger  -> xCircle

A built-in override still uses Infobox-owned color and font-scale behavior:

<Infobox tone="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.

Instance colors

colors supports independent background, border, text, and icon slots. Each accepts a fixed rgba(...) string or a complete { light, dark } pair.

<Infobox
  tone="success"
  colors={{
    border: "rgba(52,199,89,0.7)",
    background: {
      light: "rgba(232,247,236,1)",
      dark: "rgba(20,55,30,1)",
    },
  }}
>
  All changes saved.
</Infobox>

Unspecified slots continue to use their matching tone tokens.

Content ownership

Textual children are resolved into ARCUI-owned text presentation:

typography.infobox.text
central fontScale
semantic infobox text color

Arbitrary 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 path

Custom icon/content descendants remain consumer-owned and therefore do not receive ARCUI-generated suffixes.

API Reference

Infobox Built In Icon

Also inherits: ViewProps

PropTypeDefaultDescription
ref?Ref<View>—React 19 ref-as-prop.
childrenReactNoderequiredInfobox content. Textual ReactNode content receives ARCUI typography and accessibility font scaling. Arbitrary ReactNode content remains consumer-owned.
tone?TInfoboxTone"info"Semantic Infobox palette.
colors?Readonly<IInfoboxColors>—Per-instance ARCUI-owned color overrides.
style?StyleProp<ViewStyle>——
icon?TIconType—ARCUI-owned built-in icon. Its color follows the Infobox semantic tone and theme. When omitted, the default icon follows the semantic tone: info -> "info" success -> "check" warning -> "alertCircle" danger -> "xCircle"

Infobox Custom Icon

Also inherits: ViewProps

PropTypeDefaultDescription
ref?Ref<View>—React 19 ref-as-prop.
childrenReactNoderequiredInfobox content. Textual ReactNode content receives ARCUI typography and accessibility font scaling. Arbitrary ReactNode content remains consumer-owned.
tone?TInfoboxTone"info"Semantic Infobox palette.
colors?Readonly<IInfoboxColors>—Per-instance ARCUI-owned color overrides.
style?StyleProp<ViewStyle>——
customIconReactNoderequiredCompletely consumer-owned icon/content. ARCUI does not alter its color, size, accessibility or animation.

Per-instance color slots: IInfoboxColors

PropTypeDefaultDescription
background?TThemeColor——
border?TThemeColor——
text?TThemeColor——
icon?TThemeColor——

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.

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. Tone 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 tone="danger" alone creates a live region.

Theming

Relevant token areas include:

colors.*.infobox
radius.infobox
border.infobox
spacing
typography.infobox
infoboxAnimations
animations
typography.maxFontSizeMultiplier

Try it live

Open in Expo Snack ↗

On this page