Skip to main content

Function: TextField()

TextField(__namedParameters): any

Defined in: composites/TextField/TextField.tsx:124

A semantic text input composite built on React Aria's TextField.

Composes four slots: TextFieldLabel, TextFieldControl, TextFieldDescription, and TextFieldError. Each sub-part carries its own ComponentMeta with a composition role per FSL §4.

Validation feedback is driven by React Aria's isInvalid prop or validate callback and surfaces on the control, label, and validation message via the invalid token State.

Parameters

ParameterType
__namedParametersTextFieldProps

Returns

any

Example

<TextField isRequired>
<TextFieldLabel>Email</TextFieldLabel>
<TextFieldControl type="email" />
<TextFieldDescription>We never share your email.</TextFieldDescription>
<TextFieldError />
</TextField>