Skip to content
Components / Controls

Field set

Grouped form fields on a real fieldset: a titled subsection with a hairline above, and fields laid out with the house gap.

@fabrials/ui
Loading state
Name
Email addresses

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { FieldSet, FieldLegend, FieldGroup } from "@fabrials/ui";

API reference

Prop / exportTypeDescription
FieldSet disabledbooleanDisables every native control inside. Base UI checkboxes and switches are not native: disable those yourself.
FieldLegend varianttitle | labelA subsection title (16px) or a small group name (14px).
FieldLegend dividerbooleanThe hairline above, drawn on the legend and left out when the fieldset is the first of its container. On by default.
FieldGroup layoutstack | columnscolumns flows fields into as many columns of at least 15rem as the container has room for.

Behavior

A fieldset never overflows its column (min-inline-size 0). Hide a legend the design does not show with className="fui-sr-only". Field, the label-and-error wrapper, is a different piece.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.