<Formiz />

Formiz

This component creates the form context.

Import

import { Formiz } from "@formiz/core";

Props

connect

Connect your form context with the form (from useForm() hook).

See useForm() documentation for more details.

const MyForm = () => {
  const form = useForm();
 
  return <Formiz connect={form}>
    {/* Your fields here */}
  </Formiz>;
};

autoForm

  • Set to true or 'form' to wrap children in a <form> element with auto submit() on form submission.
  • Set to 'step' to wrap children in a <form> element with auto submitStep() on form submission.
const form = useForm();
 
<Formiz connect={form} autoForm>
  {/* your fields here */}
  <button type="submit">Submit</button>
</Formiz>;