> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <SubmitButton />

> A submit button for the form.

<img className="dark:hidden" width="720" height="440" noZoom src="https://mintcdn.com/attio/2EyaTyByKNPeSVcd/images/submit-button.png?fit=max&auto=format&n=2EyaTyByKNPeSVcd&q=85&s=4c88cb3740b20995c03947244df22851" data-path="images/submit-button.png" />

<img className="hidden dark:block" width="720" height="440" noZoom src="https://mintcdn.com/attio/2EyaTyByKNPeSVcd/images/submit-button-dark.png?fit=max&auto=format&n=2EyaTyByKNPeSVcd&q=85&s=f0887039a4ca8b537e62b3096b6221ed" data-path="images/submit-button-dark.png" />

<Note>This component is returned by [`useForm()`](../../forms/use-form).</Note>

<Info>
  When rendered in a [dialog](/sdk/dialogs/show-dialog), the submit button will not be shown where
  you have placed it, but will be plucked out of the dialog contents and placed at the bottom of the
  dialog.
</Info>

<Tip>
  One – ***and only one*** – `<SubmitButton />` is required as a direct child of [`<Form />`](./form).
</Tip>

## Example

```tsx form-dialog.tsx theme={"system"}
import React from "react"
import {Forms, useForm, showToast} from "attio/client"

export function FormTextInputDialog() {
  const {Form, SubmitButton, TextInput} = useForm(
    {
      name: Forms.string(),
    },
    {
      name: "",
    },
  )
  return (
    <Form
      onSubmit={async (values) => {
        await showToast({
          title: "Form submitted",
          variant: "success",
          text: JSON.stringify(values),
        })
      }}
    >
      <TextInput label="Name" name="name" />
      <SubmitButton label="Submit" />
    </Form>
  )
}
```

## Props

<ParamField path="label" type="string" required>
  The label of the submit button.
</ParamField>

<ParamField path="disabled" type="boolean">
  Whether or not the submit button should be disabled.

  <Note>
    It will automatically be disabled while the form is being submitted.

    You do not need to manage that state!
  </Note>
</ParamField>
