BalanceReckon Design System
FormsField

Field

Connects a form input to its label, description and validation message using context.

FieldProps

PropTypeRequiredDefaultDescription
descriptionReactElement——Optionally describe the intent of the input where the label alone would not suffice.
guidanceReactNode——The optional element is visible inline with 'invalidMessage'. For example, it can be used to display remaining characters for the input field (text-input or text-area)
helpTextTooltipProps['content']——Help text is hidden by default, and revealed in a tooltip from an icon beside the label. Use help text to clarify anything that may be ambiguous about the input. In most cases a description is preferred.
idstring——Used for aria attributes and various element ID suffixes. Defaults to a generated ID.
invalidMessagestring——Explain how the user's input doesn't meet the requirements of the field.
labelstringYes—The label above the input.
labelVisibleboolean——When false, the label will only be visible to screen-readers.
layout
horizontal|vertical
——Decides if label and input should be laid out horizontally or vertically. Default value is vertical.
requiredOrOptional
required|optional
——Show "(required)" or "(optional)" after the label, in regular weight.
reserveMessageSpaceboolean——Reserve the vertical space that will be taken by an invalid message. You would use this to stop subsequent elements from moving when an invalid message is displayed.