Matrix Loaders, animated React component
- Pro
- Loaders
Six 5×5 dot-matrix loaders driven by one shared pulse. Only the phase offset per dot changes, which turns the same grid into a wave, ripple, spiral, rain, sweep or checkerboard.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| size | number | 64 | Grid size of each loader in px; tiles are size + 68 px square. |
| color | string | undefined | One dot colour for every loader. Defaults to each pattern's own colour. |
| showLabels | boolean | true | Show the pulsing label ("Indexing…", "Thinking…") under each loader. |
| MatrixLoader.pattern | "wave" | "ripple" | "spiral" | "rain" | "halogen" | "checker" | number | 0 | Standalone MatrixLoader: which pattern to play, by name or index. |
| MatrixLoader.size | number | 64 | Standalone MatrixLoader: grid size in px. |
| MatrixLoader.color | string | undefined | Standalone MatrixLoader: dot colour; defaults to the pattern's colour. |
| MatrixLoader.label | string | undefined | Standalone MatrixLoader: accessible label; defaults to the pattern's label. |
Add it to your project
- 1
Set up your project once
You need a Next.js project with Tailwind CSS and the
@/import alias. In its root folder, run this once. It createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 2
Connect the registry with your API key
Matrix Loaders is a Pro item, so the CLI has to send your API key. Do this once per project:
- Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with
nxs_and is shown only once. - In your project root, next to
package.json, create a file named.env.localwith this line, using your own key:NEXUS_API_KEY=nxs_your_key_here
- Open
components.jsonand add this entry inside the outermost braces, next to"aliases". Leave{name}and${NEXUS_API_KEY}exactly as written; the CLI fills them in:"registries": { "@nexus-labs": { "url": "https://www.nexus-ui.com/api/registry/{name}", "headers": { "Authorization": "Bearer ${NEXUS_API_KEY}" } } }
- Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with
How Matrix Loaders works
only its phase offset changes, which is what turns the grid into a wave, ripple, spiral, rain, halogen sweep or checkerboard.
The source, the install command and the build prompt come with Pro.
Matrix Loaders questions
How do I install the Matrix Loaders?
Run `npx shadcn@latest add @nexus-labs/matrix-loaders`. The only library it depends on is framer-motion. It is a Pro component, so it needs a Pro plan and an API key; key setup is on the CLI docs page (/docs/cli).
How do I use a single loader instead of the six-tile grid?
Import `MatrixLoader` and pass `pattern` as "wave", "ripple", "spiral", "rain", "halogen" or "checker" (or an index from 0 to 5; the default is 0). `size` is the grid width in px (default 64) and `color` overrides the pattern's own colour.
How is the dot-matrix animation built?
It is a 5x5 grid of ordinary DOM dots, not canvas or WebGL. Every dot runs the same Framer Motion scale and opacity pulse, and only its start delay changes by position, which is what makes the wave, ripple, spiral, rain, halogen or checker shape.
Is the loader accessible, and does it respect reduced motion?
Each loader has `role="status"` and an `aria-label` taken from `label`, which defaults to the pattern's name such as "Thinking". With reduced motion on, the scale pulse is replaced by a slower opacity fade, and the labels in the grid stop pulsing.

