arkejs/ui
Getting StartedInstallUsageAPI ReferenceFormForm.FieldFormConfigProviderExamplesBasicFormConfigProvideruseFormDefault values
Form
id
id?: string
The id
of the form.
onSubmit
onSubmit?: SubmitHandler<TFieldValues>)
onSubmit
function called when the form is submitted.
onChange
onChange?: (event: { target: any; type?: any }) => void
onChange
function called when the form is changed.
methods
methods?: UseFormReturn<TFieldValues>
Methods returned from useForm
hook.
components
components: FormComponents;
An object containing the components to be used for rendering the form fields.
It provides a way to map type such string
, number
, boolean
to a custom component and also allows to define new keys for custom components.
By using this property, you can override the default components used by the table defined by FormConfigProvider
.
fields
fields?: Field[];
An array of fields to be rendered in the form.
style
style?: CSSProperties;
The style object to be applied to the form.
className
className?: string;
The className to be applied to the form.