FormTextField

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

Examples

Invalid

Props

ref
ForwardedRef<HTMLInputElement>
className
string | ((values: TextFieldRenderProps & { defaultClassName: string; }) => string)
id
string
name
string
style
CSSProperties | ((values: TextFieldRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties)
type
(string & {}) | "search" | "text" | "tel" | "url" | "email" | "password"
onCopy
ClipboardEventHandler<HTMLInputElement>
onCut
ClipboardEventHandler<HTMLInputElement>
onPaste
ClipboardEventHandler<HTMLInputElement>
onCompositionEnd
CompositionEventHandler<HTMLInputElement>
onCompositionStart
CompositionEventHandler<HTMLInputElement>
onCompositionUpdate
CompositionEventHandler<HTMLInputElement>
onFocus
((e: FocusEvent<HTMLInputElement, Element>) => void)
onBlur
((e: FocusEvent<HTMLInputElement, Element>) => void)
onChange
((value: string) => void)
onBeforeInput
FormEventHandler<HTMLInputElement>
onInput
FormEventHandler<HTMLInputElement>
onKeyDown
((e: KeyboardEvent) => void)
onKeyUp
((e: KeyboardEvent) => void)
onSelect
ReactEventHandler<HTMLInputElement>
isDisabled
boolean
autoFocus
boolean
onFocusChange
((isFocused: boolean) => void)
slot
string | null
excludeFromTabOrder
boolean
value
string
autoComplete
string
maxLength
number
minLength
number
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"
validationBehavior
"native" | "aria"'native'
isReadOnly
boolean
isRequired
boolean
isInvalid
boolean
validate
((value: string) => true | ValidationError | null)