Matrix

A React component in Beamline's Voice & audio category.

A dot-matrix display: animated frame sets (loading, pulse, wave, syncing), text and digits in a 5×7 font, or a VU meter of levels or a live source. One canvas; the loop runs only while something moves and it is on screen.

Use it for

  • Playful status in voice products: connecting, syncing, a level meter.
  • A short code, a countdown or a build number as lit dots.

Not for

Anatomy

  • canvas of dots (lit, dim)

Variants

  • content: frames (pattern or frame set), text (5×7 font), levels (VU columns, or a live source)

States

  • static
  • playing (frames advance at fps)
  • paused (autoplay false, or off screen)
  • reduced motion (first frame or the whole text, no loop)
  • held (a scrolling text holds still to be read under the pointer, on keyboard focus, or on touch after a tap until the next tap)
  • narrow room (a fixed grid scales down with its ratio kept; cols="fill" lays out as many columns as fit, and a text that fits rests in the middle instead of scrolling)
  • live meter peak hold: each column keeps a dimmer dot at its recent peak for 0.6 s after the sound falls away, then lets it fall a row every 70 ms, so how loud it just was stays readable; a new source starts with no peaks

Keyboard

  • A scrolling text is a tab stop while it scrolls: focus holds it still to be read (the pointer does the same); everything else is a picture (role img) with no keys.

Motion

Each dot eases toward its new brightness; the loop stops once every dot has settled and nothing advances. Frame sets play at fps (12 by default) only on screen and in a visible tab. Scrolling text steps column by column without easing, like a sign, so letters never smear; it scrolls only while it is wider than the display and holds still under the pointer. Reduced motion shows the first frame, the text at rest and levels without easing. A live source with one loudness is drawn as a voice envelope (louder in the middle).

Props

PropTypeDefaultDescription
rows / colsnumber / number | "fill"—Grid size; text and frames size it when omitted. cols="fill" takes the room's width: as many columns as fit (a text scrolls only while it does not fit and rests in the middle when it does).
patternFrame—One still frame.
framesFrame[]—An animation, played at `fps`.
textstring—Text in the 5×7 font; scrolls when wider than `cols`.
levelsnumber[]—One 0–1 level per column: a VU meter.
sourceMediaStream | LevelSource | (() => number)—A live VU meter from a stream, a LevelSource or a getter.
fpsnumber12
autoplay / loopbooleantrue / true
size / gapnumber8 / 2Dot size and spacing in px.
palette{ on: string; off: string }—Lit and unlit colours; default currentColor and a dim of it.
brightnessnumber1
onFrame(index: number) => void—
labelstring—Accessible name; text content is read when there is none.
style / refCSSProperties / native Ref—style: Inline styles on the documented visual root; no overrides by default. ref: Receives the documented native target or imperative handle; omitted by default.
rowsnumber—Grid size; text, pattern and frames size it when omitted. `cols="fill"` takes the room's width: as many columns as fit (more room shows more of a text, which scrolls only while it does not fit, or more level columns).
colsnumber | "fill"—
autoplayboolean—
loopboolean—
sizenumber—Dot size and spacing in px.
gapnumber—
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no overrides by default.
refRef<HTMLCanvasElement>—Receives the documented native target or imperative handle; omitted by default.

Import

import { Matrix } from "@beamline/matrix";

Get it

Matrix is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Voice & audio

  • Recorded answer: A spoken answer against a time limit: record (the microphone asked for first, a blocked one said with what to do), the running time against the limit…
  • Orb: The agent's presence: a thin ring of light around a lens in the brand's hue that holds still at rest, sends an arc round while thinking and widens with…
  • Call grid: The people on a video call, laid out for the room they are given: tiles as large as the space allows at the camera's shape, or the person talking (or a…
  • Bar visualizer: A row of bars that says what a voice agent is doing: a sweep while connecting, the person's voice while listening, a slow breath while thinking, the…
  • Transcript viewer: A recording and its words together: the spoken word lights up as it plays and the transcript follows it, any word or paragraph time plays from there…
  • Waveform: The shape of a recording: one bar per slice of loudness, fitted to any width, with the played part in the accent, unmeasured slices hatched and a loading…
  • Live waveform: Loudness drawn as it happens: a scrolling history of the microphone (or any live source) or its spectrum, a calm processing state while words are…
  • Conversation bar: The control bar of a voice call with an agent: one button to call and hang up, the agent's state as bars, a call timer, mute, and typing when talking is…
  • Audio player: One audio element and its controls: play with a loading state, a scrub bar with time, skip, speed and a playlist whose rows play into the same player…
  • Voice button: The control that starts and stops talking: click to toggle or hold to talk (pointer, Space, Enter or a global shortcut), with a live level while…
  • Scrub bar: A seekable timeline for audio or video: elapsed and total time, what has loaded, chapter marks, a time preview under the pointer, and the full keyboard…
  • Speech input: A text field you can speak into: the mic dictates through any speech-to-text provider, the phrase being heard shows apart from the finished words, and…
  • Voice picker: Choose a text-to-speech voice from a searchable list (name, accent, tone, use) and hear it first: each voice has its own orb, previews play one at a time…
  • Microphone selector: Choose the microphone, test it with a live level and mute it, with every permission and device state spelled out: not yet allowed, blocked (and how to…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.