# Spinner — React Native component for Expo

> Twelve loaders — ring, dots, bars, pulse, orbit, typing, line and more — from one API.

A loader pack: the comet ring whose tail breathes as it spins, a staggered dot wave, and ten more — equalizer bars, pulse ripple, orbit, squash-bounce, sine wave, 3×3 grid, typing bubble, counter-rotating arcs, morphing square and an indeterminate line. All native-driver loops, one size/colour/speed API, optional track and an animated-ellipsis label.

- Docs: https://expokit.in/docs/components/spinner
- Tier: Free
- Also called: loading spinner, activity indicator, loader
- Category: Loaders
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg
- Uses ExpoKit items: kit
- Variants: Variants, Loader Gallery, In Button, Loading Card, Inline Status, Colors, Sizes

## Installation

Run once per project: `npx @expokit/cli@latest init` (shared theme + KitProvider). Then:

```bash
npx @expokit/cli@latest add spinner
```

The CLI copies the source into your project (you own the code) and installs react-native-svg.

Import: `import { Spinner } from "@/components/ui/spinner";`

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"ring" \| "dots" \| "bars" \| "pulse" \| "orbit" \| "bounce" \| "wave" \| "grid" \| "typing" \| "arc" \| "square" \| "line"` | `"ring"` | Indicator style — 12 loaders. "line" is an indeterminate bar size × 4 wide (override with style.width). |
| `size` | `"sm" \| "md" \| "lg" \| "xl" \| number` | `"md"` | 16 / 24 / 36 / 52pt, or any number. Every variant scales from it. |
| `color` | `string` | `theme accent` | Indicator colour. |
| `speed` | `number` | `1` | Speed multiplier. |
| `label` | `string` | `labels.loading` | Accessibility label; shown on screen when labelPosition is set. |
| `labelPosition` | `"none" \| "right" \| "bottom"` | `"none"` | Show the label beside or under the spinner, with an animated ellipsis. |
| `track` | `boolean` | `false` | Faint guide behind the motion: full circle (ring, orbit, arc), rail (line) or ghost bars (bars). |
| `style` | `StyleProp<ViewStyle>` | — | Style for the root view (the square, or the spinner + label row/column). |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |

## Behaviour & accessibility

- **Motion**: Every variant loops on the native driver (rotation, scale, translate, opacity); the ring's arc-length breathing is the only SVG prop animation and runs on its own JS-driven node.
- **Reduced motion**: Loops stop and each loader holds a still, clearly-busy frame (staggered dots, a lit diagonal, a mid-line segment); the ring keeps a plain steady spin.
- **Screen readers**: Announced as a progress bar with state busy and your label (default "Loading"); the visual is one accessible element.
- **Platforms**: Pure React Native Animated plus react-native-svg — iOS, Android, Expo Go and web, no native setup.

## FAQ

### How do I make a loading spinner in React Native?

Use ExpoKit's Spinner: run npx @expokit/cli@latest add spinner in your Expo or React Native project and it copies a ready-made loading spinner into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Spinner work in Expo Go?

Yes. Spinner runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg) are all included in Expo Go.

### How do I add Spinner to my Expo app?

Run npx @expokit/cli@latest add spinner in your project. The CLI copies the component's source into your app and installs react-native-svg, so the code is yours to change.

### Is Spinner free?

Yes. Spinner is free: its full source is on this page and the CLI installs it without an account.

### Can I change how Spinner looks?

Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.

## More

- Live preview, variants and code: https://expokit.in/docs/components/spinner
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
