Skip to main content

Field

The Field component handles the connection between the form state and the input. It also renders UI to ensure that inputs, and the supplemental information surrounding them, are displayed to the user in a consistent way.

NameTypeDefaultDescription
labelstringundefinedThe label to display above the input, this should describe to the user what data they are expected to enter succinctly
descriptionstringundefinedLonger form description of what is expected of the user in regards to this field. Should be used sparingly.
optionalbooleanundefinedIf there are validation rules defined that would stop the form from submitting or not
optionalTextstring(OPTIONAL)The text to display next to the field label when optional={true}
maxWidthCSSProperties['maxWidth']undefinedThe max width of the field container
fullWidthbooleanundefinedWhether this field should spread across 100% of it's parent's width (maxWidth overrides this)
inputProps{ [key: string]: any }undefinedAn object of props that will be spread onto the Input component
InputComponentType<any>undefinedThe component that is rendered by the Field and passed all of the data + actions that are related to that field, as well as any inputProps supplied by the implementer
HelpContentComponentType<{ isValidating?: boolean }>;undefinedComponent that is rendered above the input and passed the field's isValidating state
HelpTooltipContentComponentType<any>undefinedIf defined, a help tooltip will be displayed above the input with this component as it's content