Skip to content

Voice Dots

A strip of tiny dots that shows what a voice agent is doing: a wave while it listens, a scan while it thinks, a pulse while it speaks and a ripple when it is done, rising with the voice and leaning toward the pointer.

On this page
Used for
  • Voice mode
  • Dictation
  • Voice agents
  • Call screens
  • Audio levels

Examples

State
Colours
Rows

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

state / level
"idle" | "listening" | "thinking" | "speaking" | "done" / number
Default"idle" / 0
What the agent is doing: each state has its own shape, and a change blends over 420ms. level is the voice loudness 0 to 1 from your app (useMicLevel(stream) while listening, the reply's output level while speaking) and scales how far the dots rise.
rows / dotSize / gap
number / number / number
Default4 / 3 / 3
Rows of dots, the dot diameter and the space between dots, in px. Columns fill the width, centred; the strip is rows × (dotSize + gap) − gap high.
colors / tint / fade
"accent" | "gradient" | string[] / number / number
Default"accent" / 24 / 0
The theme accent (--kn-accent), a quiet blue to rose to amber spread, or your own colours left to right (any CSS colour, tokens included). tint: with several colours, a soft wash rising this many px into the surface above (0 turns it off; keep it behind your content). fade: fades both ends over this many px.
pointer / pointerReach / ref
boolean / number / Ref<{ pulse(clientX?) }>
Defaulttrue / 1.5 / -
The column under the pointer is sucked up to the top row, like a magnet, while the pointer is over the closest [data-voice-dots-host] ancestor, else the parent; pointerReach is how many columns each side it reaches. ref.pulse(clientX) sends a quick spike and ripple from that x (from a click event), or from the centre; Voice Bar fires it from any button you press.
paused / className / style
boolean / string / CSSProperties
Defaultfalse
Stops the motion and holds the frame / on the canvas.

useMicLevel

useMicLevel(stream, { floorDb, ceilDb, fps })
(MediaStream | null, options?) => number
Default-60 / -12 / 30
A smoothed level 0 to 1 (fast up, slower down) from a stream your app already has; 0 without one. The hook never asks for the microphone, so pass null until the person says yes. Input at floorDb reads 0 and at ceilDb 1; fps is how often a new level reaches React, while the analyser reads every frame.

Accessibility

  • The canvas is aria-hidden and takes no pointer events. Say the state in text next to it, in a status line or the transcript, as Voice Bar does.
  • Under reduced motion nothing travels: the strip holds each state's shape and only its brightness follows the level.
  • It stops drawing while off screen or in a hidden tab, so a page full of them costs nothing at rest.
  • The microphone is always the app's: ask for it on a click, as the demo's Use mic does, and stop its tracks when you are done.

What it handles

  1. 01Draws a few rows of dots on a canvas at the screen's pixel ratio, sized to its container.
  2. 02Gives each agent state one shape you can read in a single frame: drift, wave, scan, pulse and ripple.
  3. 03Blends one state into the next on the motion tokens, so a quick change never jumps.
  4. 04Follows a voice level from the app with a fast rise and a slow fall, so it moves with syllables without flicker.
  5. 05Sucks the column under the pointer up like a magnet, on a spring, and lets go when the pointer leaves.
  6. 06Ripples out from a point when you call pulse(x), so a press on a button above it shows in the dots.

States

First render
Nothing plays in. The strip draws the state it was given
none
Idle
A flat, faint base row
still
Listening
An uneven wave travels across, as tall as the voice is loud
continuous, level follows in 40ms up, 220ms down
Thinking
One narrow bright band sweeps edge to edge and back, the rest dim
continuous
Speaking
A broad pulse breathes out from the centre with the voice
continuous
Done
A ripple runs out from the centre and settles to idle
about 2s, once
State change
The old motion fades into the new one, never a cut; a change mid-blend carries on from where it was
420ms, ease in and out
Pointer over the surface
The column under it is sucked up to the top row, with a little falloff each side; it drops back when the pointer leaves
spring (glide)
pulse(x)
A spike at x, then a ripple running both ways that fades; the state underneath carries on
1.1s, once
Off screen or hidden tab
The frame loop stops and the last frame stays
none
Reduced motion
Nothing travels: each state holds its shape and only the brightness follows the level
none

Works with

When to use

When to use

  • The edge of an input or a card in voice mode: show that the agent hears, thinks or talks.
  • A level meter with character for dictation or a call, driven by useMicLevel.
  • Anywhere a thin strip should carry the agent's state without words.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Voice Dots to my app and wire it to my own data.
  • I need the edge of an input or a card in voice mode: show that the agent hears, thinks or talks. Set that up with the Knowns UI Voice Dots.
  • Which Voice Dots props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "voice-dots" }) and search_docs({ query: "voice dots" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Voice Dots, or found something off? We read every message.