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 · minusAdditional string names become usable after the application provides them through iconSet; do not assume an arbitrary icon name exists in the default registry.
Color ownership
Priority:
animatedColor
-> color
-> complete darkColor + lightColor pair
-> ARCUI icon tokensFixed color
<Icon type="check" color="rgba(52,199,89,1)" />Theme-aware pair
<Icon
type="check"
darkColor="rgba(255,255,255,1)"
lightColor="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.
Reverse default token colors
reverseThemeColor reverses ARCUI's default dark/light icon token colors. Explicit animatedColor, color, or complete theme pairs continue to own their configured behavior.
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>
| Prop | Type | Default | Description |
|---|---|---|---|
| ref? | Ref<Svg> | — | React 19 ref-as-prop. |
| type | TIconType | required | Icon name from the active ARCUI icon set. |
| size? | number | tokens.sizings.icon.m | Rendered icon size. |
| color? | string | — | Fixed color used in every theme. Ignored when animatedColor is provided. |
| darkColor? | string | — | Theme-aware color pair. Both values must be provided. An incomplete pair is ignored. Ignored when animatedColor or color is provided. |
| lightColor? | string | — | — |
| 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 color, darkColor, lightColor, reverseThemeColor and ARCUI's default icon colors. |
| reverseThemeColor? | boolean | false | Reverses ARCUI's default dark/light icon colors. Explicit color props are never reversed. |
| scaleWithFont? | boolean | false | Whether 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? | number | tokens.sizings.icon.strokeWidth | Stroke width for stroke-based icon glyphs. |
Generated from the ARCUI 1.1.x 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.iconTop-level token overrides are shallow. Compose changed built-in namespaces from defaultTokens rather than relying on recursive merge behavior.
Try it live
Open the existing React Native Snack to explore Icon interactively.