Skip to Content
ARCUI

Icon

Provider-configurable ARCUI SVG icon abstraction with theme-aware or UI-thread-owned color.

Icon renders a glyph from the active ARCUI icon registry.

Usage

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

<Icon type="check" />;

Icon registry

ARCUI exports defaultIcons, and the root provider accepts a compatible iconSet.

import { ARCUI, defaultIcons, type TIconSet } from "react-native-arc-ui";

const iconSet = {
  ...defaultIcons,
  // app-specific icons may be added
} satisfies TIconSet;

<ARCUI iconSet={iconSet}>{children}</ARCUI>;

Every configured set must provide ARCUI's required icon names because built-in ARCUI components depend on them.

ARCUI guarantees these names in defaultIcons:

check · alertCircle · info · chevronDown · chevronLeft · chevronRight
search · xCircle · eye · eyeOff · plus · minus

Additional string names become usable after the application provides them through iconSet; do not assume an arbitrary icon name exists in the default registry.

Example
ARCUI built-in icon catalog

Color ownership

Priority:

animatedColor
-> colors.icon
-> ARCUI icon tokens

Fixed color

<Icon type="check" colors={{ icon: "rgba(52,199,89,1)" }} />

Theme-aware pair

<Icon
  type="check"
  colors={{
    icon: {
      dark: "rgba(255,255,255,1)",
      light: "rgba(0,0,0,1)",
    },
  }}
/>

UI-thread-owned final color

const animatedColor = useDerivedValue(() => /* final color */);

<Icon type="check" animatedColor={animatedColor} />;

animatedColor may be a Reanimated SharedValue<string> or DerivedValue<string> and is treated as the final rendered color.

Example
ARCUI Icon color ownership examples

Reverse a theme subtree

reverseThemeColor was removed in 2.0.0. Wrap the Icon in ReverseTheme when it should consume the opposite ARCUI theme together with its surrounding content:

<ReverseTheme>
  <Icon type="check" />
</ReverseTheme>

animatedColor continues to override colors.icon when the caller already owns the final UI-thread color.

Size and font scale

Explicit icon geometry is fixed by default.

<Icon type="info" size={24} />

Set scaleWithFont only when the icon should intentionally grow with ARCUI accessibility font scale.

Testing

Use testID where the public component contract exposes it so application tests can target the ARCUI-owned root without depending on visual implementation details. Component-specific stable descendants may use documented suffixes.

For provider setup and the dedicated react-native-arc-ui/testing entrypoint, see Testing.

API Reference

Also inherits: Omit<SvgProps, TLockedIconSvgProps>

PropTypeDefaultDescription
ref?Ref<Svg>—React 19 ref-as-prop.
typeTIconTyperequiredIcon name from the active ARCUI icon set.
size?numbertokens.sizings.icon.mRendered icon size.
colors?Readonly<IIconColors>—Per-instance ARCUI-owned color overrides. Ignored when animatedColor is provided because animatedColor is already the final UI-thread-owned rendered color.
animatedColor?TIconAnimatedColor—Final UI-thread color owned by the caller. When provided, this is the complete source of truth for Icon color and takes precedence over colors.icon and ARCUI's default icon tokens.
scaleWithFont?booleanfalseWhether Icon size follows ARCUI's accessibility font scale. Icon is a geometric primitive by default, so explicit size means the actual rendered size unless this behavior is opted into.
strokeWidth?numbertokens.sizings.icon.strokeWidthStroke width for stroke-based icon glyphs.

Per-instance color slots: IIconColors

PropTypeDefaultDescription
icon?TThemeColor—Icon glyph 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.

The generated table above covers ARCUI-owned public props from the source-aligned type snapshot. Native inherited surfaces remain available where the public type extends React Native props.

Motion

Icon color and optional font-scale sizing are resolved through Reanimated animated props. A caller-provided animatedColor can remain UI-thread owned end to end.

See Motion for the library-wide model.

Performance

Keep application semantics at normal React update cadence. ARCUI components avoid using React state as a frame-by-frame animation driver; use the component callbacks and let Reanimated own continuous visual work.

See Performance for broader guidance.

Accessibility

Standalone Icons are decorative by default. Supplying accessibilityLabel makes a standalone Icon meaningful unless accessible is explicitly overridden.

Do not give decorative icons inside already-labeled controls a duplicate accessible name.

See Accessibility for the library-wide model.

Theming

This component resolves its normal presentation from ARCUI tokens and active theme context. Prefer token configuration for system-wide design changes and component props for genuine instance-level exceptions.

Relevant token areas include:

colors.*.icon
sizings.icon

Top-level token overrides are shallow. Compose changed built-in namespaces from defaultTokens rather than relying on recursive merge behavior.

See Tokens and Theming.

Try it live

Open the existing React Native Snack to explore Icon interactively.

Open in Expo Snack ↗

On this page