Fieldset

Fieldset is a component used to group elements such as legends, helper messages, and error messages in a fieldset element.

Contact details

Usage

import { Fieldset } from "@yamada-ui/react"
<Fieldset.Root>
  <Fieldset.Legend />
  <Fieldset.Header>
    <Fieldset.Legend />
    <Fieldset.HelperMessage />
  </Fieldset.Header>
  <Fieldset.Content />
  <Fieldset.HelperMessage />
  <Fieldset.ErrorMessage />
</Fieldset.Root>

Change Variant

Contact detailsPlease provide your contact details below.
Contact detailsPlease provide your contact details below.
Contact detailsPlease provide your contact details below.
Contact detailsPlease provide your contact details below.

Change Size

Contact detailsPlease provide your contact details below.
Contact detailsPlease provide your contact details below.
Contact detailsPlease provide your contact details below.

Displaying a Helper Message

To display a helper message, set a ReactNode to helperMessage.

Contact detailsPlease provide your contact details below.

Alternatively, you can customize using Fieldset.HelperMessage.

Contact detailsPlease provide your contact details below.

Displaying an Error Message

To display an error message, set invalid to true and assign a ReactNode to errorMessage.

Contact detailsPlease provide your contact details below.
Some fields are invalid. Please check them.

Alternatively, you can customize using Fieldset.ErrorMessage.

Contact detailsPlease provide your contact details below.
Some fields are invalid. Please check them.

Required

To make it required, set required to true.

Contact detailsPlease provide your contact details below.

Disable

To disable, set disabled to true.

Contact detailsPlease provide your contact details below.

Read-Only

To make it read-only, set readOnly to true.

Email addressWe'll never share your email.

Invalid

To make the input invalid, set invalid to true.

Email addressWe'll never share your email.
Some fields are invalid. Please check them.

Customize the Legend

To customize the legend, use Fieldset.Legend.

Contact detailsPlease provide your contact details below.

Customize the Header

To customize the header, use Fieldset.Header.

Contact detailsPlease provide your contact details below.

Customize the Content

To customize the content, use Fieldset.Content.

Contact detailsPlease provide your contact details below.
Some fields are invalid. Please check them.

Props

Accessibility

Currently, this section is being updated due to the migration of v2.