Fieldset, Label & Legend
<Fieldset /> component is used to wrap Field components into groups.
Fieldset can be displayed inline
Field can be individually displayed as inline inside
legend property allows for a heading which is by default aligned above and to the left.
label as a prop in
Field gives a larger clickable area since the area where the label is placed also is associated to the component that has the label.
Fieldset offers an accordion mode via the
In accordion mode, the
legend acts as a disclosure and clicking on it will show (or hide) the
Note: Using accordion mode without passing a value to
legend will throw a console warning and will result in a regular
Controlling a Fieldset Accordion
Accordion props pertaining to open state control can be used on
Fieldset. Simply pass said props to
Fieldset while the
accordion prop is true.
Accordion props include:
For more details on the props listed above, visit the Accordion documentation.