Component

A semantic form grouping primitive for related controls, legends, descriptions, and validation messages.

preview
Delivery window

Select when someone will be available to receive the package.

React
"use client" import Fieldset from "@radui/ui/Fieldset" export default function FieldsetExample() { return ( <Fieldset.Root className="flex w-full max-w-[360px] flex-col gap-3" invalid> <Fieldset.Legend>Delivery window</Fieldset.Legend> <Fieldset.Description id="delivery-description"> Select when someone will be available to receive the package. </Fieldset.Description> <label className="flex items-center gap-2"> <input type="radio" name="delivery-window" value="morning" aria-describedby="delivery-description" /> Morning </label> <label className="flex items-center gap-2"> <input type="radio" name="delivery-window" value="afternoon" aria-describedby="delivery-description" /> Afternoon </label> <Fieldset.Message invalid>Select one delivery window.</Fieldset.Message> </Fieldset.Root> ) }
  • Uses native fieldset and legend elements for grouped form controls
  • Propagates disabled state through the browser's form semantics
  • Provides description and validation message slots
  • Exposes stable data-slot, data-disabled, and data-invalid hooks

Import all parts of the component and piece them together

React
import Fieldset from "@radui/ui/Fieldset" export default () => { return ( <Fieldset.Root> <Fieldset.Legend /> <Fieldset.Description /> <Fieldset.Message /> </Fieldset.Root> ) }

The native fieldset element used to group related form controls.

PropTypeDefault
customRootClass
string
""
disabled
boolean
false
invalid
boolean
false
name
string
--
form
string
--
color
string
""
size
string
""
variant
string
""

The native legend element that labels the fieldset.

PropTypeDefault
children
ReactNode
--
className
string
--

Optional descriptive text for the grouped controls.

PropTypeDefault
children
ReactNode
--
id
string
--

Optional helper or validation message for the grouped controls.

PropTypeDefault
invalid
boolean
false
role
string
--
children
ReactNode
--
ShortcutDescription
Tab

Moves focus through enabled form controls inside the fieldset.

ReferenceWhat Rad UI follows

Uses the native fieldset and legend relationship so assistive technology announces the group label with contained controls.