Skip to content

MicButton

Stable

The one mic control for dictation and starting voice, with every mic state written next to it: recording, locked, turning speech into text, blocked and no mic.

Also known as microphone button, record button, push to talk

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Dictate into a message box

Your words go into the box. Nothing is sent until you send it.

Tap once to start and once to stop. The button waits for permission, records, then writes the words into the box. The person still sends it.

When to use it

Gives people one clear, labelled control for the mic, so they always know whether it is listening. The state is in words beside the button, not only in an icon or a colour.

Made of: Round button · Mic icon, level bars, stop mark or spinner · Attention dot (blocked only) · State word · Hold hint · Cancel (locked only) · Live region (hidden)

Use it for

  • Dictating into a message box: the speech fills the field and the person sends it.
  • Starting a voice conversation from a composer.
  • Hold-to-talk voice notes on a phone, with slide up to lock and slide away to cancel.

Not for

  • Muting the mic during a live voice session: use VoicePanel.
  • Playing back a recording.
  • A plain toggle that is not about the mic: use Switch.

Do and avoid

Type, or press the micRecording
Do. The word Recording sits by the mic, so its state is always clear.
Type, or press the mic
Avoid. An amber dot alone looks like a problem and never says it is listening.

Do

  • Keep the transcribed words in the field for the person to read and send.
  • Show blocked with a way to fix it, not a dead button.
  • Use lg for the main control on a voice screen, md inside a composer.
  • Give a typed route next to the mic.

Avoid

  • Do not colour the recording state lime. Lime is for the AI; this is the person's voice.
  • Do not use amber for recording. Amber is only for blocked, where the person has to act.
  • Do not rely on the system mic dot alone to show the mic is on.
  • Do not start recording without a press.

On a phone

  • The button is 44px (md) or 56px (lg), so it meets the touch size without extra padding.
  • Hold mode stops the page from scrolling or opening the long-press menu while the finger is down.
  • Slide up 56px to lock, or slide more than 32px off the button and let go to cancel. The words beside the button say which will happen.
  • Start and stop give a short buzz on phones that support it. Turn it off with haptics={false}.

Seen in products

  • Claude: dictation fills the message box and the person sends it; push-to-talk holds Space in Claude Code's /voice.
  • Gemini Live: Mute, Hold and End are separate, labelled controls.
  • Messaging apps: hold to record a voice note, slide up to lock and slide away to cancel.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started