This documentation is under construction. Pages can be missing or change at any time. Follow it on GitHub.

Skip to content

Fieldset

A native fieldset element with an easily stylable legend.

API reference#

Import the components of the family:

use function Phem\Ui\{Fieldset, FieldsetLegend};

Fieldset#

A group of fields with a legend: Base UI Fieldset.Root. --fieldset-gap is the space between the fields and after the legend: a <legend> is not a flex item, so it gets the space as a margin. Change the space with the variable, for example className="[--fieldset-gap:0.5rem]".

PropTypeDefault
disabledboolfalse
children?Htmlnull
...restmixed—

FieldsetLegend#

The legend of a fieldset: Base UI Fieldset.Legend. It is a <legend>, so the browser names the group with it.

PropTypeDefault
children?Htmlnull
...restmixed—

The source of the examples: examples/ui/Fieldset.phem.

Phem
Esc
↑↓ to navigate↵ to openEsc to close