Text field

A single-line input users can type into — or dictate into: “name Jane Doe”.

Say the command and keep talking: the field claims the phrase and streams the remainder into its value as you speak, filtered by type — emails lose their spaces and gain an @, numbers parse from words, names capitalize. When listening stops, onMatch fires once with the final value.

Basic dictation

Loading the React Native kit…

Hold anywhere and say:“name jane doe”“name arthur dent”

Props

  • default command
  • not set
React Native
Updates as you tick props
import { ListensTextField } from "@listenssoft/speechui-react-native";import { useState } from "react";
function Demo() {  const [name, setName] = useState("");  return (    <ListensTextField      label="Name"      command="name"      type="name"      placeholder="Jane Doe"      value={name}      onChangeText={setName}      onMatch={setName}    />  );}

Value types filter the dictation

type shapes what lands in the value: email converts a spoken “at” to @ and strips spaces (“email jane at example dot com” — say “dot” as “.” is up to the recognizer); number parses spoken numbers (“age forty two” → 42); letters drops digits; name capitalizes each word; url strips spaces.

Loading the React Native kit…

Hold anywhere and say:“email jane at example.com”“age forty two”

React Native
import { ListensTextField } from "@listenssoft/speechui-react-native";import { View } from "react-native";import { useState } from "react";
function Demo() {  const [email, setEmail] = useState("");  const [age, setAge] = useState("");  return (    <View style={{ gap: 12 }}>      <ListensTextField        label="Email"        command="email"        type="email"        value={email}        onChangeText={setEmail}      />      <ListensTextField        label="Age"        command="age"        type="number"        value={age}        onChangeText={setAge}      />    </View>  );}

What you can say

SayEffect
“name jane doe”Starts-with match: claims the phrase and streams “jane doe” into the value as you speak (filtered by type).
“the name is jane doe”Contains fallback: if no other control claimed the phrase, sets the value to the words after the command (“is jane doe”). The command with nothing after it leaves the value unchanged.
“f i v e”Spelled-out runs collapse to words before filtering (“five”).

While you keep speaking, interim results keep updating the value — dictation feels live, not batched. onMatch fires exactly once, when listening stops, with the final accumulated value.

API reference

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

Props

PropTypeDefaultDescription
typeListensTextValueType—Dictation filter; also picks a matching keyboardType where one exists.
placeholderstring—Native placeholder.
listeningContentstringcommandShown as the label while the mic is open.
editableboolean—RN's disabled equivalent.

Extra props

PropTypeDefaultDescription
commandstringlabelThe spoken prefix that starts dictation.
labelstring—Label above the input; the command fallback.
valuestring—Controlled value. Pair with onChangeText.
onChangeText(value: string) => void—Called on every change — typing or dictation.
onMatch(value: string) => void—Fires once when listening stops, with the final accumulated value.
multilineboolean—Render as a multi-line area (ListensTextArea sets this for you).
styleStyleProp<ViewStyle>—Style override for the outer container.
inputStyleStyleProp<TextStyle>—Style override for the TextInput.
labelStyleStyleProp<TextStyle>—Style override for the label text.

Styling hooks

Style props and theme keys

HookTypeDefaultDescription
style / inputStyle / labelStyleStyleProp—Direct overrides.
theme.border / theme.surface / theme.placeholdertoken—Input chrome colors from the active ListensTheme.

Behavior notes

  • All frameworks: A starts-with match claims the transcript, so a field named “name” won't also trigger a button whose command appears later in the same phrase.

Was this page helpful?