Components
<Form />
A component that wraps your form inputs and provides an onSubmit
handler.


This component is returned by
useForm()
.You are required to render one – and only one – of these to make your form work.
All inputs must be inside of the <Form />
.
Props
onSubmit : (values) => void | Promise<void>
What to do with the form values on submit. Typically you will call a server function.
In TypeScript, the values will be strongly typed to match your form schema.
TODO: Fix above link to “form schema”
children : React.ReactNode
The contents of your form, usually layout and input components.
A form must contain one – and only one – [`
`](./submit-button) as a direct child.
Was this page helpful?