Form#

This component extends form html element. It is meant to be used with FormField components, in which it will add useful props for form validation.

Example#

import { useForm } from 'react-hook-form';
import { Form, FormField } from 'la-danze-ui';
function App() {
const form = useForm();
return (
<Form form={form}>
<FormField name="email" rules={...} />
...
</Form>
);
}

Props#

Extends React.FormHTMLAttributes props

Additional props:

NameTypeDefaultRequiredDescription
formUseFormMethods<any>YesValue of react-hook-form useForm().
disabledbooleanNoDisable all fields. Overriden by FormField disabled prop.