Form

Examples

Simple Form

Please provide your full name
Copied to clipboard

Horizontal form

Please provide your full name
Copied to clipboard

Invalid form

Your email is not in a correct format
Age has to be a number
Copied to clipboard

Various labels and helper text

Label and helperText can be a string, a function or a node.

This is a helper text
Badge here!
Copied to clipboard

Form Props

The Form component accepts the following props.

NameTypeRequiredDefaultDescription
children
node
nullAnything that can be rendered as Form content.
className
string
''Additional classes added to the Form.
isHorizontal
bool
falseSets the Form to horizontal.

FormGroup Props

The FormGroup component accepts the following props.

NameTypeRequiredDefaultDescription
children
node
nullAnything that can be rendered as FormGroup content.
className
string
''Additional classes added to the FormGroup.
label
node
undefinedLabel text before the field.
isRequired
bool
falseSets the FormGroup required.
isValid
bool
trueSets the FormGroup isValid.
isInline
bool
falseSets the FormGroup isInline.
helperText
node
undefinedHelper text after the field. It can be a simple text or an object.
helperTextInvalid
node
undefinedHelper text after the field when the field is isValid. It can be a simple text or an object.
fieldId
string
ID of the included field. It has to be the same for proper working.

ActionGroup Props

The ActionGroup component accepts the following props.

NameTypeRequiredDefaultDescription
children
node
nullAnything that can be rendered as ActionGroup content.
className
string
''Additional classes added to the ActionGroup.