Skip to content

SmartFormProps

SmartFormProps<Schema>: object

Type Parameters

Type Parameter
Schema extends ZodObject<any>

Type declaration

NameTypeDescription
defaultValuesDefaultValues<z.infer<Schema>>A set of initial values used to pre-fill the form.
fieldsMetaSmartFormFieldsMetadataA zod schema that defines additional metadata for the form fields.
onSubmit(data) => Promise<void> | voidA callback function invoked when a user clicks the “Save” button. The submit button is not displayed by default; you must pass the onSubmit props for it to appear.
schemaSchemaA zod schema that defines the shape of the form. Only ZodObject, ZodString, ZodBoolean, and ZodNumber are supported at this time.