Spinner
Pre-alphaThe registry and the CLI are not published yet.Roadmap

Spinner

Loading indicator.

Uploading
Sizes
Colors

Inverse

With a label
Syncing 12 photos…
Centered in a container

Installation

npx axiom add spinner
pnpm dlx axiom add spinner
yarn dlx axiom add spinner
bun x axiom add spinner

Installs: react-native-reanimated.

Usage

import { Spinner } from '@/components/ui/spinner';

<Spinner />
<Spinner size="lg" color="muted" label="Loading messages" />

Props

PropTypeDefaultDescription
size'sm' | 'md' | 'lg' | number'md'From the icon size tokens: 16, 20, 24pt, or a number.
colorContentColor'default'Content color from the theme. Use inverse on solid backgrounds, muted when the spinner is secondary.
labelstring'Loading'Accessibility label, announced when the spinner appears. It isn’t rendered: put visible text next to it yourself.
animatingbooleantruefalse hides the spinner without unmounting it, keeping its space in the layout.
delaynumber0Waits this many ms before showing. A 150–300ms delay avoids a flash on fast responses.
styleStyleProp<ViewStyle>Extra styles for the container.

The rotation runs on the UI thread, so it keeps turning while JavaScript is busy. With reduce motion on, it pulses instead of spinning.

Use cases

Loading a screen for the first time

A centered spinner with a delay, when there is nothing to show yet and the layout of the result isn’t known.

Invoice #2041
if (isLoading) {
	return (
		<View style={styles.center}>
			<Spinner size="lg" color="muted" delay={200} label="Loading invoice" />
		</View>
	);
}

Loading more at the end of a list

A small spinner as the list footer while the next page loads.

A

Ada Lovelace

B

Barbara Liskov

C

Claude Shannon

D

Dennis Ritchie
<FlatList
	data={people}
	onEndReached={fetchNextPage}
	ListFooterComponent={
		isFetchingNextPage ? (
			<Spinner color="muted" style={{ padding: 20 }} />
		) : null
	}
/>

Inline status

A small spinner next to text that says what is happening, for background work the user can ignore.

Backup

iCloud PhotosUploading 12 of 48…
MessagesUp to date
<OptionItem
	icon="refresh"
	iconColor="blue"
	label="iCloud Photos"
	description={`Uploading ${done} of ${total}…`}
	trailing={<Spinner size="sm" color="muted" />}
/>

When to use it

Use a spinner for short or indeterminate waits. When the shape of the content is known, a Skeleton usually feels faster. Inside a button, use its loading prop instead.