Form

Formは、複数のフォーム要素をグループ化するためのコンポーネントです。

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

使い方

import { Form } from "@yamada-ui/react"
<Form.Root>
  <Form.Header>
    <Form.Title />
    <Form.Description />
  </Form.Header>
  <Form.Body>
    <Form.Group />
  </Form.Body>
  <Form.Footer>
    <Form.SubmitButton />
  </Form.Footer>
</Form.Root>

propsを使う

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

バリアントを変更する

Create an account

Create an account to get started.

Personal information
If not set, a password will be automatically generated.

Create an account

Create an account to get started.

Personal information
If not set, a password will be automatically generated.

Create an account

Create an account to get started.

Personal information
If not set, a password will be automatically generated.

Create an account

Create an account to get started.

Personal information
If not set, a password will be automatically generated.

サイズを変更する

Create an account

Create an account to get started.

Personal information
If not set, a password will be automatically generated.

Create an account

Create an account to get started.

Personal information
If not set, a password will be automatically generated.

Create an account

Create an account to get started.

Personal information
If not set, a password will be automatically generated.

ヘルプメッセージを表示する

ヘルプメッセージを表示する場合は、helperMessage{[key: string]: ReactNode}を設定します。

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

エラーメッセージを表示する

エラーメッセージを表示する場合は、errorMessage{[key: string]: ReactNode}を設定します。

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

必須にする

必須にする場合は、required{[key: string]: boolean}を設定します。

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

無効にする

無効にする場合は、disabled{[key: string]: boolean}を設定します。

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

読み取り専用にする

読み取り専用にする場合は、readOnly{[key: string]: boolean}を設定します。

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

必須インジケーターをカスタマイズする

必須インジケーターをカスタマイズする場合は、requiredIndicatorReactNodeを設定します。

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

オプショナルインジケーターを使う

オプショナルインジケーターを使う場合は、optionalIndicatorReactNodeを設定します。

Create an account

Create an account to get started.

If not set, a password will be automatically generated.

Props

類似のコンポーネント

Field

Fieldは、フォーム要素に、ラベル、ヘルパーメッセージ、エラーメッセージなどをグループ化するために使用されるコンポーネントです。

Fieldset

Fieldsetは、フィールドセット要素に、レジェンド、ヘルパーメッセージ、エラーメッセージなどをグループ化するために使用されるコンポーネントです。

ZStack

ZStackは、子要素を奥行き方向にスタックするために使用されます。

VStack

VStackは、子要素を垂直方向にスタックするために使用されます。

Wrap

Wrapは、Flexwrapを設定したコンポーネントです。Flexから便利なスタイルのショートハンドを継承しています。

Stack

Stackは、要素をグループ化し、子要素間にスペースを設けるコンポーネントです。

Spacer

Spacerは、要素間に空間を追加するために使用するコンポーネントです。

SimpleGrid

SimpleGridは、Gridをより使いやすくシンプルにしたコンポーネントです。

使用しているコンポーネント・フック

使用されているコンポーネント・フック