Label button

listens-label-button@listenssoft/speechui-angular

A styled button that fires when its command is heard — “launch” clicks it.

The speech path performs a real click on the underlying button, so a type="submit" button submits its form exactly as a pointer click would. While the mic is open the button can swap its content to a spoken hint via listeningContent.

Bringing your own design system? The bare button is this control with zero styling and zero markup.

Basic button

Loading the Angular kit…

Hold anywhere and say:“launch”

Props

  • default command
  • default false
Angular
Updates as you tick props
import { Component, signal } from "@angular/core";import { ListensLabelButtonComponent } from "@listenssoft/speechui-angular";
@Component({  selector: "demo-label-button",  imports: [ListensLabelButtonComponent],  template: `    <div style="display: grid; gap: 8px; justify-items: start">      <listens-label-button        label="Launch"        command="launch"        (clicked)="count.set(count() + 1)"      />      <span>Launched {{ count() }} times</span>    </div>  `,})export class DemoLabelButton {  count = signal(0);}

A hint while listening

listeningContent replaces the button's content while the mic is open — the button itself tells the user what to say.

Loading the Angular kit…

Hold anywhere and say:“confirm”

Angular
import { Component, signal } from "@angular/core";import { ListensLabelButtonComponent } from "@listenssoft/speechui-angular";
@Component({  selector: "demo-label-button-listening",  imports: [ListensLabelButtonComponent],  template: `    <div style="display: grid; gap: 8px; justify-items: start">      <listens-label-button        label="Confirm order"        command="confirm"        listeningContent='say “confirm”'        (clicked)="last.set(now())"      />      <span>Last confirmed: {{ last() }}</span>    </div>  `,})export class DemoLabelButtonListening {  last = signal("—");  now() {    return new Date().toLocaleTimeString();  }}

What you can say

SayEffect
“launch”Fires the button once (a real click on the underlying element).
“…ready to launch now…”Also fires — matching is contains, not starts-with, unless another control claimed the phrase first.
“launch … (again within ~1s)”Ignored: a per-command cooldown swallows the interim re-deliveries of one utterance. Repeating after a brief pause fires again.

Buttons match anywhere in the phrase but respect claims: if a value control claimed the transcript with a starts-with match (say, a text field named “launch window”), the button stays quiet.

API reference

Angular inputs & outputs for @listenssoft/speechui-angular.

Inputs

InputTypeDefaultDescription
listeningContentstringcommandText shown inside the button while the mic is open.
disabledbooleanfalseDisables the button.

Extra inputs

InputTypeDefaultDescription
labelstring""The button text; the spoken command fallback.
commandstringlabelThe spoken command that clicks the button.
type"button" | "submit" | "reset""button"Forwarded to the inner button; a speech match on submit submits the form.

Outputs

OutputTypeDefaultDescription
clickedMouseEvent—Emitted on click — real or speech-triggered (the speech path calls click() on the button).

Styling hooks

CSS hooks

HookTypeDefaultDescription
.listens-label-buttonclass—Same classes and tokens as React.
data-listeningattribute—On the host while the mic is open.

Behavior notes

  • Angular: On a native <button> you can skip the component entirely: <button listensCommand="launch"> — the command directive clicks its host. See the command page.

Was this page helpful?