Skip to content

FormBuilder and FormViewer reference

FormBuilder

Props

PropTypePurpose
builder-idstringStable id used for multi-instance isolation.
schemaFormBuilderSchemaControlled form schema.
valuesFormBuilderValuesControlled runtime values.
settingsPartial<FormBuilderSettings>Form settings.
readonlybooleanDisable editing behavior.
disabledbooleanDisable interactions.
autosavebooleanEnable local autosave.
storage-keystringCustom storage key.
titlestringOptional title.
subtitlestringOptional subtitle.
heightstringBuilder height.
preview-modeFormBuilderPreviewModePreview display mode.
drawer-behaviorFormBuilderDrawerBehaviorDrawer behavior.
labelsPartial<FormBuilderLabels>UI labels override.

v-model

vue
<FormBuilder
  v-model:schema="schema"
  v-model:values="values"
  v-model:settings="settings"
/>

Events

txt
update:schema
update:values
update:settings
save
reset
cancel
submit
field-add
field-update
field-remove
field-copy
field-select
field-move
schema-import
schema-export
error

API exposed by ref

ts
export interface FormBuilderPublicApi {
  save: () => void
  reset: () => void
  setSchema: (schema: FormBuilderSchema) => void
  getSchema: () => FormBuilderSchema
  setValues: (values: FormBuilderValues) => void
  getValues: () => FormBuilderValues
  importSchema: (schema: FormBuilderSchema) => void
  exportSchema: () => FormBuilderSchema
}

FormViewer

Props

PropTypePurpose
form-fieldsFormBuilderSchemaSchema to render.
model-valueFormBuilderValuesRuntime values.
readonlybooleanRender as read-only.

v-model

vue
<FormViewer
  :form-fields="schema"
  v-model="values"
/>

submit event

vue
<FormViewer
  :form-fields="schema"
  v-model="values"
  @submit="handleSubmit"
/>

Useful types for a host app

ts
import type {
  FormBuilderSchema,
  FormBuilderValues,
  FormBuilderSavePayload,
  FormBuilderPublicApi,
} from '@vevedh/qform-builder-layer/types'

QForm Builder — reusable Nuxt 4 / Quasar / FormKit layer.