Skip to content

Fieldset

A native fieldset that names a group of related form controls.

API key scopes

Invoke published workflows and chatflows.

List messages, annotations and feedback logs.

Upload documents and edit indexed chunks.

hero.tsx

Usage guidelines

  • Use Fieldset when one question is answered by several controls: a checkbox or radio group, a multi-thumb slider, or a section of related inputs. A single control uses Field alone.
  • Name the group with FieldsetLegend, and keep a label on every control in it. For checkbox and radio options, wrap each option in a FieldItem with its own FieldLabel.
  • Render the group primitive through render, as in render={<CheckboxGroup />}, so the group element carries the legend name. Pass value, defaultValue and change handlers to the group primitive; set disabled on the outer Field to disable the whole grouped field and its labels, or on a FieldItem to disable one option.
  • Every Radio belongs to a RadioGroup. Do not render a standalone Radio.
  • Wrap a checkbox or radio group in a Field with a name when the group is one form value. The Field submits the selected values and carries the group's validate and FieldError; see Form for the flow.

Anatomy

tsx
tsx

A section of separate inputs uses Fieldset without render and without an outer Field; each input keeps its own Field.

Examples

Radio options with descriptions

A FieldItem scopes a label and a description to one option, so each radio is named by its label and described by its own text. Arrow keys move the selection inside the RadioGroup.

Retrieval setting

Finds chunks with a similar meaning to the query.

Matches the exact keywords in the query.

Runs both and reranks the combined results.

radio-group.tsx

A plain Fieldset groups separate fields under one legend. Each input keeps its own Field, label and error.

HTTP proxy
section.tsx

Disabled group

Set disabled on the outer Field so the group, its options and their labels all enter the disabled state. A FieldDescription in the outer Field explains why and describes every option.

Index method

The index method is fixed once a document is embedded with the economical method.

disabled.tsx

API reference

Fieldset

Groups a shared legend with related form controls such as checkbox groups or radio groups. Renders a <fieldset> element.

Provides group semantics and labeling; pass interactive state such as disabled and value to the underlying group primitive.

Base UI Fieldset.Root docs

Data attributes
AttributeDescription
data-disabled

Whether the component should ignore user interaction.

FieldsetLegend

An accessible label that is automatically associated with the fieldset. Renders a <div> element.

Base UI Fieldset.Legend docs

Data attributes
AttributeDescription
data-disabled

Present when the fieldset is disabled.