Field component is lower level building block for generating custom
Using a render prop, the field component connects the label, description, and message to the input element.
If the layout of the
Field component doesn't work for you, or for any other
reason, you can compose the elements below in a way that suites. Please be
mindful to maintain accessibility.
div element, intended to describe the field's intention.
Fieldset is a semantic grouping of form elements, to be used within a form.
legend prop becomes a caption for the form grouping. You can put any form
elements, with their labels, inside
legendAppearance prop to maintain semantic markup, while giving the
legend the appearance of a label within forms.
div element, intended to provide users with an invalid message within the context of a field.
Use help text to clarify anything that may be ambiguous about the input. In most cases a description is preferred.
You must maintain accessibility when composing the elements yourself to create a custom component.