Skip to main content

Type Alias: TextFieldProps

TextFieldProps = Omit<RACTextFieldProps, "style" | "className" | "children"> & object & FieldAuthoring<RACTextFieldProps["children"]>

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

Props for the TextField root.

The composite owns its layout; pass style/className on a wrapping element rather than on the composite root. See CONTRIBUTING §4.

Authoring is a union: supply label/description/errorMessage for the one-line form, or compose the slots as children. Mixing them is a type error rather than a precedence rule.

Type Declaration

format?

optional format?: FieldFormat

A registered input format (br.cpf, br.cep, …) — resolves the mask, the touch keyboard (inputMode) and the autofill token together (ADR-026). The submitted value is the masked string; validation (a CPF's checksum, say) stays with the caller's validate, because a validate message is user-facing copy this package cannot ship (ADR-001). Available in both authoring forms — it shapes the control's behaviour, not the envelope's arrangement.