Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Voice Dots, animated React component

  • Pro
  • AI Components
  • Glow
  • Spring

Bar

A voice composer whose sound wave is made of dots. Press the mic and a ring of dots runs out along the bottom edge while a rainbow of square dots blooms up behind it, with embers floating off the peaks as the words arrive in the text line. Press it again and the dots sink to a line with a pulse running along it while it thinks, then everything rests. Two looks, each on its own preview: Bar is a low band along the bottom edge, Field is a tall field of dots that fills the card. The wave is a synthetic voice by default; turn on liveMic to draw the real microphone's levels.

Field

Props

PropTypeDefaultWhat it does
phrase"Set a timer for ten minutes and remind me to stretch"What the transcript shows as the person speaks; the words arrive one at a time.
transcripttrueStream the words into the composer as they are spoken. Off, it just says Listening.
variant"bar"Bar is a low band of dots along the bottom edge. Field is a tall field of dots that fills the card as the voice rises.
liveMicfalseListen to the real microphone and draw its levels. Without it, or if the permission is refused, the wave is a synthetic voice.
placeholder"Ask me anything…"The composer's resting text.
onModeChange—Called whenever it moves between idle, listening and thinking.
onSend—Called when the person stops speaking and the voice is sent.
baretrueTrue is just the card. Pass false to sit it on a black stage.
autoplayfalseSpeaks, thinks and rests by itself until the visitor touches it. Never runs under reduced motion.
className""Extra classes for the outer element.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry with your API key

    Voice Dots is a Pro item, so the CLI has to send your API key. Do this once per project:

    1. Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with nxs_ and is shown only once.
    2. In your project root, next to package.json, create a file named .env.local with this line, using your own key:
      NEXUS_API_KEY=nxs_your_key_here
    3. Open components.json and add this entry inside the outermost braces, next to "aliases". Leave {name} and ${NEXUS_API_KEY} exactly as written; the CLI fills them in:
      "registries": {
        "@nexus-labs": {
          "url": "https://www.nexus-ui.com/api/registry/{name}",
          "headers": {
            "Authorization": "Bearer ${NEXUS_API_KEY}"
          }
        }
      }

How Voice Dots works

Voice Dots: a voice composer whose wave is made of dots. One card that holds still. Press the mic: a ring of dots runs out along the bottom edge from the button and the rainbow of square dots blooms up behind it, nearest the button first, with embers floating off the peaks while the words arrive in the text line. Press it again and the dots sink to a line with a pulse running along it while it thinks, then everything rests.

The source, the install command and the build prompt come with Pro.