Checkbox

Multi select by voice: “toppings cheese and olives” toggles both.

A checkbox group holding a string[]. Speech toggles each option once per time it is spoken: “toppings cheese” checks Cheese; saying “cheese” again in the same breath unchecks it. Occurrence counting keeps interim recognition flutter from double-toggling.

Basic multi select

Loading the React Native kit…

Hold anywhere and say:“toppings mushrooms”“toppings cheese and olives”

Props

  • not set
React Native
Updates as you tick props
import { ListensCheckbox } from "@listenssoft/speechui-react-native";import { useState } from "react";
function Demo() {  const [toppings, setToppings] = useState(["Cheese"]);  return (    <ListensCheckbox      label="Toppings"      command="toppings"      options={["Cheese", "Mushrooms", "Olives", "Peppers"]}      value={toppings}      onChange={setToppings}    />  );}

What you can say

SayEffect
“toppings mushrooms”Toggles Mushrooms.
“toppings cheese and olives”Toggles both — every matched option in the remainder toggles.
“toppings cheese … cheese”Checks Cheese, then unchecks it: each spoken occurrence is one toggle.
“…add mushrooms to the toppings…”Works too — the command may appear anywhere; everything after it is matched.

A new utterance (after a pause) starts fresh, so repeating “toppings cheese” later toggles again. Aliases work exactly as on the radio group.

API reference

React Native props for @listenssoft/speechui-react-native.

Props

PropTypeDefaultDescription
disabledboolean—Disables the options.

Extra props

PropTypeDefaultDescription
options*string[]—The options.
commandstringlabelThe spoken prefix.
labelstring—Group label; the command fallback.
valuestring[]—Controlled checked values.
onChange(values: string[]) => void—Called with the next checked set.
aliasesRecord<string, string[]>—Spoken aliases per option value.
style / labelStyleStyleProp—Container and label overrides.

Styling hooks

Style props and theme keys

HookTypeDefaultDescription
style / labelStyleStyleProp—Direct overrides.
theme.interactivetoken—The checked fill color.

Behavior notes

  • All frameworks: Unlike the radio group, the checkbox matches the command anywhere in the phrase (contains), then matches everything after it.

Was this page helpful?