Skip to content

Murmur

Playground

State

Colour

Input level only drives the listening state.

import { Murmur } from "@shavin/ui";
<Murmur state="thinking" size={96} />

Install

npm install @shavin/ui
import { Murmur } from "@shavin/ui";

Works with

React

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

Remotion

Murmur animates on its own loop, so it is for live pages; it does not follow FxTimeProvider yet.

States

idle

thinking

working

listening

searching

composing

weaving

connecting

Props

PropTypeDefaultDescription
state"idle" | "thinking" | "working" | "listening" | "searching" | "composing" | "weaving" | "connecting""thinking"Which motion. "orbiting" and "looping" are the loaders; a name added with registerMurmurState also works, and an unknown name falls back to "thinking".
sizenumber24Diameter in px.
levelnumber0Live input level 0 to 1; drives "listening".
speednumber1Speed multiplier.
dotsnumberautoDot count; scales with size by default.
dotSizenumber0.4Dot size multiplier.
labelstringthe state nameAccessible name (role="img"). Pass "" to hide it from assistive tech when a visible label sits beside it.
classNamestring-Colour via a text colour class, e.g. text-success; the dots use currentColor, text-brand-contrast by default.

Murmur is a free component in @shavin/ui. It draws to a canvas, skips drawing while off screen and holds a still frame under prefers-reduced-motion. It is also documented on the Murmur component page. The loader states (orbiting, looping) are on the Dot loaders page.

Anatomy

import { Murmur, registerMurmurState } from "@shavin/ui";

<Murmur state="searching" size={24} />

// Your own state: a function per dot, per frame
registerMurmurState("pulse", (dot, frame, out) => { /* write out.x/y/z/size/alpha */ });
Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font