Skip to content

Field

A label, a control, a description and an error, in that order.

Installation

Default

Label to control: related.

With description

Tight under the control.

With error

invalid on the field, aria-invalid on the control, FieldError last.

Several errors

FieldError errors lists them.

With title

A control that is not an input is named by FieldTitle through aria-labelledby.

Pills

Pills sit under their label: TabsRadioGroup.

Columns

FieldGroup columns=2 for short peers.

Horizontal

Settings: orientation='horizontal' puts the label and description beside the control.

In a card

A form is fields in a card; the footer shows while there are changes.

In a form

With react-hook-form, Controller renders the Field. Submit to see the error.

Disabled

disabled on the field mutes the label; the control takes its own.