File size: 955 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
title: Fieldset
description: A set of form controls optionally grouped under a common name.
links:
  source: components/fieldset
  storybook: components-fieldset--basic
  recipe: fieldset
  ark: https://ark-ui.com/react/docs/components/fieldset
---

<ExampleTabs name="fieldset-basic" />

## Usage

```jsx
import { Fieldset } from "@chakra-ui/react"
```

```jsx
<Fieldset.Root>
  <Fieldset.Legend />
  <Fieldset.Content />
</Fieldset.Root>
```

## Examples

### Disabled

Use the `disabled` prop to disable the fieldset to disable all input elements
within the fieldset.

<ExampleTabs name="fieldset-with-disabled" />

### Invalid

Use the `invalid` prop to mark the fieldset as invalid. This will show the error
text.

> Note: You need to pass the `invalid` prop to the `Field` component within the
> fieldset to make each input element invalid.

<ExampleTabs name="fieldset-with-invalid" />

## Props

<PropTable component="Fieldset" part="Root" />