---
title: "Loader"
description: "Seventeen indicators from one size prop."
documentation: "https://beui.dev/react-native/loader"
markdown: "https://beui.dev/react-native/loader.md"
---

# Loader

> Seventeen indicators from one size prop.

React Native component for Expo, from beUI Native. Group: Motion. Variants: 17.

## Install

Set up beUI Native once per app first: https://beui.dev/docs/native-setup.md

```bash
npx beui-native add loader
```

Or copy the source by hand and install its libraries:

```bash
npx expo install react-native-reanimated react-native-worklets
npm install uniwind tailwindcss
```

## Links

- Source: https://github.com/starc007/beui-native/tree/main/src/components/loader
- Registry JSON with every file: https://beui.dev/native/r/loader
- Open in Expo Go: exp://u.expo.dev/93a3a95c-6dc2-4adb-b57c-efbecf859f25/--/loader?runtime-version=exposdk%3A58.0.0&channel-name=production
- Web version: https://beui.dev/components/motion/loader.md

## README

### Loader

Native port of [beUI Loader](https://beui.dev/components/motion/loader). Seventeen loading indicators that all scale from one `size`.

```tsx
import { Loader } from "./src";

<Loader />
<Loader variant="dots" size={24} />
<Loader variant="helix" speed={1.4} className="text-primary" />
<Loader variant="ascii-braille" label="Thinking" />
```

**Variants:** `spinner`, `dots`, `bars`, `dot-matrix`, `dither`, `morph`, `comet`, `scramble`, `metaballs`, `newton`, `helix`, `percent`, and the terminal-style `ascii`, `ascii-line`, `ascii-braille`, `ascii-blocks` and `ascii-bounce`.

- **Size and speed:** `size` (32 points by default) sets the square everything scales from. `speed` is seconds per cycle (1 by default), matching the web prop.
- **Color:** the theme's foreground colour by default. Pass a colour utility in `className` (such as `text-primary`) or a `color` value.
- **Motion:** every variant uses the web version's timings, keyframes and stagger on beUI's in-out curve.
- **Accessibility:** the loader is one element with the `progressbar` role and a busy state. `label` ("Loading" by default) is its spoken name.
- **Reduced motion:** when the system asks for it, or `disableAnimation` is set, movement is replaced by a calm opacity pulse. ASCII frames and the percent counter slow down instead of stopping, because they swap content rather than move it. Newton stays still.

The web version draws three variants with SVG. Here they're drawn with Views, so the component needs no SVG library:
- **Spinner:** the arc is the top border of a ring, so its ends are square rather than round.
- **Morph:** cycles through a circle, square, diamond and squircle using corner radius and rotation, rather than morphing SVG paths. It doesn't have the web version's triangle or hexagon.
- **Metaballs:** two dots cross while a blob swells where they meet, standing in for the SVG goo filter.

Copy this directory, `hooks/use-reduced-motion.ts`, `styles/motion.ts`, and the semantic tokens in `styles/theme.css`.
