FormTextField

A form text field connects a <TextField /> to a <Form /> component using react-hook-form.

Examples

Invalid

Props

className
string | ((values: TextFieldRenderProps & { defaultClassName: string; }) => string)—
isDisabled
boolean—
autoFocus
boolean—
onFocus
((e: FocusEvent<HTMLInputElement, Element>) => void)—
onBlur
((e: FocusEvent<HTMLInputElement, Element>) => void)—
onFocusChange
((isFocused: boolean) => void)—
onKeyDown
((e: KeyboardEvent) => void)—
onKeyUp
((e: KeyboardEvent) => void)—
style
CSSProperties | ((values: TextFieldRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties)—
slot
string | null—
id
string—
type
(string & {}) | "search" | "text" | "tel" | "url" | "email" | "password"—
excludeFromTabOrder
boolean—
name
string—
value
string—
ref
ForwardedRef<HTMLInputElement>—
pattern
string—
defaultValue
string—
enterKeyHint
"enter" | "done" | "go" | "next" | "previous" | "search" | "send"—
spellCheck
string—
autoCorrect
string—
inputMode
"none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal"—
onCopy
ClipboardEventHandler<HTMLInputElement>—
onCut
ClipboardEventHandler<HTMLInputElement>—
onPaste
ClipboardEventHandler<HTMLInputElement>—
onCompositionEnd
CompositionEventHandler<HTMLInputElement>—
onCompositionStart
CompositionEventHandler<HTMLInputElement>—
onCompositionUpdate
CompositionEventHandler<HTMLInputElement>—
onChange
((value: string) => void)—
onBeforeInput
FormEventHandler<HTMLInputElement>—
onInput
FormEventHandler<HTMLInputElement>—
onSelect
ReactEventHandler<HTMLInputElement>—
validationBehavior
"native" | "aria"'native'
isReadOnly
boolean—
isRequired
boolean—
isInvalid
boolean—
validate
((value: string) => true | ValidationError | null)—
minLength
number—
maxLength
number—
autoComplete
string—