TextInput
Beta notice: This page is being built.Edit on GitHub(opens in new tab)
Edits themed text with optional local state and native form serialization. Required fields cannot be blank.
longlink docs component "TextInput"
Example
Properties
| TextInput - Properties |
|---|
label Label text for the input: always rendered for accessibility.string |
description Description text displayed between the label and input.string |
name Includes the themed control's value under this form submission name.string |
required Requires a value before native form submission.boolean |
disabled Prevents interaction and excludes the field from submission.boolean |
value Current value of the input.string |
defaultValue Initial value.string |
onChange Callback fired when the input value changes.(value: string) => void |
placeholder Placeholder text shown when the input is empty.string |
maxLength Maximum Unicode code points, matching Python string length. Validates without truncating input.number |
type The HTML input type."text" | "password" | "email" |
autoComplete Native autocomplete hint.string |
startIcon Icon displayed at the start of the input.ReactNode |
onEnter Runs on Enter, except when confirming an IME composition.() => void |