Skip to content

Form Renderer ​

ts
import { FormRenderer } from '@macrulez/vue-form-schema/ui'

Props ​

form ​

UseFormReturn

Return value of useForm.

components ​

Partial<Record<FieldType, Component>> · default: built-ins

Override per-type renderers.

submitLabel ​

string · default: 'Submit'

Submit button text.

Slots ​

#field-{name} ​

Scope: { field, value, error, touched, setValue, touch }

Replace an entire field.

#label-{name} ​

Scope: { field }

Replace a label.

#error-{name} ​

Scope: { field, error }

Replace error display.

#submit ​

Scope: { isSubmitting, isValid }

Replace the submit button.

Built-in field components ​

All exported individually from vue-form-schema/ui:

ComponentField types
TextFieldtext, email
NumberFieldnumber
TextareaFieldtextarea
SelectFieldselect
CheckboxFieldcheckbox
RadioFieldradio
DateFielddate
ArrayFieldarray
FileFieldfile