Fieldset
Group related controls with native disabled semantics.
Interactive preview
Usage
import { Fieldset, Label, Checkbox } from "@devvy-ui/react";
<Fieldset legend="Notifications" description="Choose the updates you need."><Label><Checkbox name="news" /> Product news</Label><Label><Checkbox name="releases" defaultChecked /> Release notes</Label></Fieldset>API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| legend | ReactNode | required | Visible group name. |
| description | ReactNode | — | Connected group instructions. |
| disabled / form | native fieldset props | — | Native grouping and form ownership. |
Accessibility & behavior
Platform Behavior & Guidelines
Native fieldset/legend preserve group relationships and disabled descendant behavior. Individual controls still need labels. For controls outside a form, associate each control with its form as well; native fieldset form ownership does not automatically associate its descendants.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add fieldsetMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.