A submit button that automatically shows a loading state when the parent form is submitting.
Props for the Button component.
A Button component configured for form submission.
This component uses useFormStatus to detect the pending state of the form. It passes the loading prop to the underlying Button component.
loading
<Form schema={schema} onSubmit={handleSubmit}> <SubmitButton>Save Changes</SubmitButton></Form > Copy
<Form schema={schema} onSubmit={handleSubmit}> <SubmitButton>Save Changes</SubmitButton></Form >
A submit button that automatically shows a loading state when the parent form is submitting.