@bach.software/vue-dynamic-form

A simple yet highly extendable dynamic form system, inspired by the flexibility of XSD and powered by Vee-Validate.
1,108
Install
npm install @bach.software/vue-dynamic-form
Latest Version:0.7.0
Vue:3
Last Updated:Oct 24, 2026
Links: GitHub  ·  npm
Maintainer: jeroenbach

Vue Dynamic Form

npm

A schema-driven form library for Vue 3. Describe your form as metadata and let the library handle paths, array repetition, mutually exclusive branches, and XSD-inspired validation — while your own template controls every pixel of the UI.

Why

Most form libraries couple logic to markup. Vue Dynamic Form separates the two:

  • Metadata defines structure — fields, groups, arrays, choices, validation rules, and runtime computedProps.
  • Your template decides how each field type looks, using whatever component library or design system you already have.
  • DynamicForm connects them at runtime and manages state via vee-validate.

This makes it practical for forms that come from configuration or a backend schema, forms that repeat sections dynamically, and UIs that need to render the same logical form in more than one visual style.

Packages

Package Description Published
packages/core The library — DynamicForm, defineMetadata, useDynamicForm, validation rules ✅ @bach.software/vue-dynamic-form
docs/ VitePress documentation site with interactive demos ✅ vue-dynamic-form.bach.software
playgrounds/storybook Component playground for template development ❌ local only

Quick Start

npm install @bach.software/vue-dynamic-form vee-validate @vee-validate/rules vue

Define a metadata contract once with defineMetadata, then pass a metadata array and your own template to DynamicForm:

<script setup lang="ts">
import { DynamicForm, useDynamicForm } from '@bach.software/vue-dynamic-form';
import MyFormTemplate from './MyFormTemplate.vue';

const { handleSubmit } = useDynamicForm();

const metadata = [{
  name: 'person',
  type: 'heading',
  children: [
    { name: 'firstName', type: 'text', fieldOptions: { label: 'First name' } },
    { name: 'lastName', type: 'text', fieldOptions: { label: 'Last name' } },
  ],
}];
</script>

<template>
  <form @submit.prevent="handleSubmit(values => console.log(values))">
    <DynamicForm :metadata :template="MyFormTemplate" />
  </form>
</template>

MyFormTemplate is a Vue component you write once using DynamicFormTemplate slots. The Building Templates guide walks through the full setup.

Documentation

Full manual, API reference, and runnable examples at vue-dynamic-form.bach.software.

Key sections:

The core package has its own detailed README at packages/core/README.md.

Contributing

See CONTRIBUTING.md for local development setup, the dev workflow, testing, and the release process.

Larger changes are planned and tracked through the spec-driven workflow in specs/: features are designed and architected as a whole, reviewed adversarially, approved, and then implemented as small story slices. The /spec:* Claude Code commands in .claude/commands/spec/ drive that workflow, and specs/components.md is the living inventory of the library's public surface.

Related Packages

@imengyu/vue-dynamic-form

A data driven form component for vue3

2,220
vjform

Vue JSON Form

3,800 108
@schemaform/vue

Vue 3 integration for Formify — SchemaRenderer, SchemaDesigner, built-in widgets

12,287
jervis-form

A dynamic Vue 3 form library for building configurable forms.

2,032
dynamic-form-render

`dynamic-form-render` 是基于`vue.js` ,`element-ui` 的前端动态表单渲染器,可通过...

1,153 8

Version History

Version Released Vue License
0.7.0 ^3.5.44
0.6.0 >=3.5.18
0.5.0 >=3.5.18
0.4.0 >=3.5
0.3.0 >=3.5