SpinnerLoader
Indeterminate ARCUI loading indicator with theme-aware SVG color, optional font-scale coupling, and Reduced Motion support.
SpinnerLoader is a geometric primitive for indeterminate visual progress.
Usage
import { SpinnerLoader } from "react-native-arc-ui";
<SpinnerLoader />;The default geometry comes from tokens.sizings.spinnerLoader.size and tokens.border.spinnerLoader.
Size
<SpinnerLoader size={24} />size must be a finite number greater than zero. Invalid per-instance values report in development and fall back to the configured sizing token.
The SVG arc geometry is resolved in an unscaled coordinate system so stroke width and arc proportions remain predictable.
Font scaling
SpinnerLoader is geometric by default:
<SpinnerLoader size={20} />Set scaleWithFont only when the spinner should intentionally grow with ARCUI's accessibility font scale:
<SpinnerLoader size={20} scaleWithFont />When enabled, the complete viewport scales proportionally, including stroke geometry.
Colors
<SpinnerLoader color="white" />
<SpinnerLoader
darkColor="white"
lightColor="black"
/>Priority:
color
-> complete darkColor + lightColor pair
-> colors.*.spinnerLoader.colorAn incomplete dark/light pair is ignored and reports in development.
Composition
SpinnerLoader intentionally does not carry a built-in message, role, or busy-state label. Compose it inside a control/surface that owns the actual loading semantics:
<Button loading>Save</Button>or pair it with application text when the spinner is standalone.
Native surface
ISpinnerLoader inherits ViewProps except children/ref ownership. React 19 ref-as-prop exposes the outer native View, and root style remains available for layout positioning.
Testing
Use testID on the root through inherited ViewProps. The internal rotating SVG is deliberately implementation detail and does not expose ARCUI test suffixes.
API Reference
Also inherits: Omit<ViewProps, "children" | "ref">
| Prop | Type | Default | Description |
|---|---|---|---|
| ref? | Ref<View> | — | Native SpinnerLoader container ref. |
| size? | number | tokens.sizings.spinnerLoader.size | Rendered spinner size. Must be a finite number greater than zero. |
| scaleWithFont? | boolean | false | Whether SpinnerLoader geometry follows ARCUI's accessibility font scale. SpinnerLoader is a geometric primitive by default, so an explicit size means the actual rendered size unless scaling is explicitly enabled. |
| color? | string | — | Fixed color used in every theme. Takes precedence over darkColor/lightColor. |
| darkColor? | string | — | Theme-aware color pair. Both values must be provided. An incomplete pair is ignored and ARCUI falls back to the SpinnerLoader theme tokens. |
| lightColor? | string | — | — |
Generated from the ARCUI 1.1.x TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.
Motion
The visible arc rotates continuously with Reanimated withRepeat(withTiming(...)). Active animation is cancelled before replacement/unmount.
When Reduced Motion is preferred, rotation remains stopped at its neutral orientation rather than running a JavaScript timer or alternative loop.
Performance
Continuous rotation runs on the UI thread. SVG geometry and dash lengths are calculated from the resolved size once per render; color interpolation follows ARCUI theme progress through animated SVG props.
Accessibility
The internal rotating visual is hidden from the accessibility tree. SpinnerLoader alone does not communicate what is loading or whether the application is busy.
Expose meaningful loading semantics on the surrounding component/screen where the state actually belongs.
Theming
Relevant token areas include:
colors.*.spinnerLoader
sizings.spinnerLoader
border.spinnerLoader
spinnerLoaderAnimations
animationsTry it live
Explore SpinnerLoader interactively in Expo Snack.
Open SpinnerLoader in Expo Snack ↗