# Dot Matrix Loader (Pro)

> A grid of dots with a motion for each kind of work, from loading, thinking and reasoning to syncing, routing and monitoring. It fills in for progress, and ends with a green burst on success or a red flash and shake on error.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Components › Loaders & Progress |
| Live preview | https://uibrik.com/components/dot-matrix-loader |
| Writes | 1 file into `components/uibrik/dot-matrix-loader/` |
| Packages | `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 26, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/dot-matrix-loader
```

No license yet? Tell the user Dot Matrix Loader is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=dot-matrix-loader#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { DotMatrixLoader } from "@/components/uibrik/dot-matrix-loader/dot-matrix-loader";

<DotMatrixLoader
  grid={8}
  size={64}
  gap={0.2}
  shape="circle"
  trail={0.5}
  speed={1}
  flow={1}
  color="#2f6bff"
  angle={45}
  successColor="#22c55e"
  errorColor="#f43f5e"
  // label="…"
  // restColor="…"
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/dot-matrix-loader.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `state` | `"loading" \| "thinking" \| "reasoning" \| "planning" \| "searching" \| "generating" \| "analyzing" \| "syncing" \| "uploading" \| "downloading" \| "listening" \| "waiting" \| "connecting" \| "writing" \| "processing" \| "indexing" \| "streaming" \| "focusing" \| "routing" \| "monitoring" \| "progress" \| "success" \| "error" \| "idle"` | `"thinking"` | What the work is doing. Activities loop; progress, success, error and idle hold still. |
| `value` | `number` | `60` | Progress while state is progress. |
| `showLabel` | `boolean` | `true` | Show the state's label beside the grid. |
| `grid` | `number` | `8` | Dots per side. |
| `size` | `number` | `64` | Width and height of the grid. |
| `gap` | `number` | `0.2` | Space between dots, as a share of one cell. |
| `shape` | `"circle" \| "square"` | `"circle"` | Dot shape. |
| `trail` | `number` | `0.5` | How long a dot stays lit after the motion passes. |
| `speed` | `number` | `1` | Tempo multiplier. |
| `flow` | `number` | `1` | How fast the gradient drifts through the grid. 0 holds it still. |
| `color` | `string` | `"#2f6bff"` | One colour; the gradient runs through its shades. |
| `colors` | `string[]` | `["#ff4f00","#ffb000","#ff2e63"]` | Gradient stops. They loop, so the drift never hits an end. Overrides color. |
| `angle` | `number` | `45` | Direction of the gradient. |
| `successColor` | `string` | `"#22c55e"` | Colour of the success burst. |
| `errorColor` | `string` | `"#f43f5e"` | Colour of the error flash. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `label` | `string` |  | Read out to screen readers and shown with showLabel. Defaults to a label for the state, with the percentage in progress. |
| `restColor` | `string` |  | Solid colour of resting dots, any CSS colour. Defaults to a neutral grey that follows light and dark mode. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **AI assistants**: Thinking, reasoning, planning and searching each move differently, so people can tell what the model is doing at a glance. Pairs with [Streaming Chat](https://uibrik.com/components/streaming-chat.md) (Pro).
- **Long-running tasks**: One indicator carries a job from waiting through progress to done or failed, without swapping components. Pairs with [Progress](https://uibrik.com/components/progress.md).
- **Uploads and syncs**: Progress grows as a spiral from the centre, with the next dot breathing at its edge. Pairs with [Sync Button](https://uibrik.com/components/sync-button.md).

## Same shelf: Loaders & Progress

- [Liquid Progress](https://uibrik.com/components/liquid-progress.md): A simple progress bar with a liquid feel: tones of one colour that brighten as it fills, a soft shine, and a front that settles with a small wobble.
- [Loading Shimmer](https://uibrik.com/components/loading-shimmer.md): A light sweep across text while something loads.
- [Progress](https://uibrik.com/components/progress.md): A quiet card of work in flight: each row is the app's mark, what's happening and a thin bar, and opens like a dropdown into facts, steps or one bar per destination. Values ease on a spring, percentages count with the fill, and finishing draws a check.
- [Send](https://uibrik.com/components/send.md): File upload that fills, then launches a paper plane out of the card.
- [Skeleton](https://uibrik.com/components/skeleton.md): A skeleton measured from the real layout: one bar per wrapped line of text, a box for every image and control, one shimmer across them all, and a top-to-bottom reveal when the content arrives.
- [Spinner](https://uibrik.com/components/spinner.md): A small family of loading indicators (ring, radial, dots, bars, orbit) drawn on one grid with one stroke and tempo.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/dot-matrix-loader/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
