Skip to content

Matrix loader

Playground

Pattern

Colour

Install

npm install @shavin/fx
import { MatrixLoader } from "@shavin/fx";

Works with

React

Client component; Next.js and any React 18+ app

Remotion

Frame-exact through FxTimeProvider or time

Patterns

wave

snake

ripple

rain

Props

PropTypeDefaultDescription
pattern"wave" | "snake" | "ripple" | "rain""wave"How the light moves: "wave" sweeps a diagonal band, "snake" runs a lit tail row by row, "ripple" spreads rings from the centre, "rain" drips each column at its own pace.
gridnumber3Dots per side, rounded and clamped to 3 to 7.
sizenumber24Width and height in px.
speednumber1Speed multiplier.
dotSizenumber1Dot size multiplier.
labelstring"Loading"Accessible name. Pass "" when a visible label sits beside it.
color"fg" | "brand" | "muted" | string | { light: string; dark: string }-Colour of the dots: a theme token, any CSS colour or var(--token), or a { light, dark } pair. Sets the root's CSS color; without it the dots use currentColor.
classNamestring-A text colour class (e.g. text-success) also colours the dots when color is unset (default the brand-contrast text colour).
timenumber-Controlled time in seconds (e.g. frame / fps in Remotion): the loader draws that moment and runs no clock of its own. Also read from FxTimeProvider.

Anatomy

import { MatrixLoader } from "@shavin/fx";

<MatrixLoader />
<MatrixLoader pattern="snake" grid={4} size={20} color="fg" />
Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font