@duplojs/form

961 1
Install
npm install @duplojs/form
Latest Version:0.2.0
Vue:3
License:MIT
Last Updated:Jun 5, 2026
Links: GitHub  ·  npm
Maintainer: mathcovax

@duplojs/form

NPM version

@duplojs/form is a structure-first, strongly typed form library for Vue.

Instead of wiring forms manually (value collection, validation plumbing, complex UI flows), you compose a FormField tree and let the library handle the form mechanics.

Provide your input components or use the ones already available, compose layouts, and you get a powerful form engine with reusable rendering and strong typing.

What’s inside?

  • createForm(...): creates a reusable useForm(...) initializer bound to your templates.
  • createInput(...): turns your Vue components into reusable form inputs.
  • Built-in layouts to model real-world forms:
    • useMultiLayout
    • useRepeatLayout
    • useUnionLayout
    • useStepLayout
    • useSectionLayout
    • useSlotLayout
    • useCheckLayout
    • useDisabledLayout
  • Default implementations:
    • @duplojs/form/vueGrid + @duplojs/form/vueGrid.css
    • @duplojs/form/vueDesignSystem + @duplojs/form/vueDesignSystem.css

Why this approach

  • Structure-first approach: define the form structure once, then compose and reuse it.
  • Logic is built-in: nested layouts, complex branches, step forms, and conditional disabling.
  • Design freedom: keep your own design system and visual identity.
  • Contract-based inputs: if your component respects the minimal input contract, it becomes a first-class form input with createInput(...).
  • End-to-end typing: from declared fields to checked output value.

Core concepts

  • Inputs and layouts both return FormField, so everything composes the same way.
  • A form is initialized from one root FormField.
  • currentValue is the live raw form state.
  • check() executes validation for the full tree and returns checked output (or errors).
  • Templates control rendering only, not business logic.
  • Field validation is defined through dataParser; during check(), these parsers are executed and drive validation errors/messages.

Install

npm install @duplojs/form@0 @duplojs/utils@1

Documentation

https://form.duplojs.dev

Related Packages

@spicycoding/vue-form-builder

This is a vue component for building HTML forms

15,803
jenesius-vue-form

Heavy form system for Vue.js

4,940 45
@schemaform/vue

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

12,287
vue-form-send

A Vue.js directive for sending data from form and primitive validation inputs

1,199 4

Version History

Version Released Vue License
0.2.0 >=3.5.30 <4.0.0 MIT
0.1.2 >=3.5.30 <4.0.0 MIT
0.1.1 >=3.5.30 <4.0.0 MIT
0.1.0 >=3.5.30 <4.0.0 MIT
Pre-releases (3)
Version Released Vue License
0.1.0-beta.3 >=3.5.42 <4.0.0 MIT
0.1.0-beta.2 >=3.5.42 <4.0.0 MIT
0.1.0-beta.1 >=3.5.42 <4.0.0 MIT