v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

Fieldset

Group related controls with native disabled semantics.

Interactive preview

Notifications

Choose your workspace updates.

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:

PropTypeDefaultDescription
legendReactNoderequiredVisible group name.
descriptionReactNode—Connected group instructions.
disabled / formnative 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 fieldset

Make 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.

Fieldset.tsxREACT / TSX

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.