Pho Design System

Fieldset

Groups related fields under a shared legend so the relationship is announced to assistive tech. Built on Base UI Fieldset, it renders a native <fieldset> and links the legend to it via aria-labelledby.

Import

import { Fieldset } from "@photon-ai/pho-ui/components/fieldset";

Basic

Fieldset.Legend titles the group; place any fields inside Fieldset.Root.

Billing address
<Fieldset.Root>
  <Fieldset.Legend>Billing address</Fieldset.Legend>
  <Input label="Street" />
  <Input label="City" />
</Fieldset.Root>

Disabled

disabled on Fieldset.Root turns off every control in the group at once — it flows through both the native <fieldset disabled> and Base UI Field, so contained Inputs dim and block input together.

Billing address
<Fieldset.Root disabled>
  <Fieldset.Legend>Billing address</Fieldset.Legend>
  <Input label="Street" />
  <Input label="City" />
</Fieldset.Root>

Anatomy

Props

Fieldset.Root

Fieldset.Legend

Accessibility

The fieldset has no interactions of its own — keyboard focus moves through the contained fields as normal.

Best practices