@creatiwity/formbuilder

Creat FormBuilder
2,455
Install
npm install @creatiwity/formbuilder
Latest Version:1.10.0
Vue:3
License:MIT
Last Updated:Jul 22, 2026
Links: npm
Maintainer: julienblatecky

Creat formbuilder

npm version npm downloads License Nuxt

:warning: This package is under development stay tuned. :warning:

Nuxt3 Typescript Simple formbuilder

Features

Quick Setup

  1. Add @creatiwity/formbuilder dependency to your project
# Using pnpm
pnpm add @creatiwity/formbuilder

# Using yarn
yarn add @creatiwity/formbuilder

# Using npm
npm install @creatiwity/formbuilder
  1. Add @creatiwity/formbuilder to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: ["@creatiwity/formbuilder"],
});

That's it! You can now use Creat formbuilder in your Nuxt app ✨

Recommended Usage

  • First define one or multiple factories in which you'll specify a component of your own to be instantiate in the formbuilder.
  • Use your factories to construct your form 'elements'
  • Validation is based on Vuelidate
  • Errors can be customized
export interface FieldInputProps {
  key: string;
  name: string;
  type: string;
  state?: "error" | "disabled";
}

export function useInputField(
  data: FieldInputProps,
  options: FormOptions<FormModel>
): FormElementItem<FormModel> {
  return {
    key: data.key,
    props: (): FieldInputProps => ({
      key: data.key,
      name: data.name,
      type: data.type,
    }),
    component: FormInput,
    validation: options.validation,
    isReadOnly: options.isReadOnly,
    isHidden: options.isHidden,
    mandatory: options.mandatory ?? false,
  };
}

const MyForm = (): FormElement<FormModel> => ({
  sets: [
    {
      title: "First Section",
      description: "Section description",
      elements: [
        useInputField(
          {
            key: "name",
            name: "Nom",
            type: "text",
          },
          {
            validation: () => {
              return { required, minLength: minLength(3) };
            },
            isReadOnly: (data) => data.name === "test",
          }
        ),
      ],
    },
  ],
});

const myForm = ref<FormModel>({
  name: "aaaa",
});

const myFormElement = MyForm();

const errors: FormElementError = {
  name: {
    required: "Le nom est requis",
  },
};
<div>
  <CreatFormBuilder
    id="myForm"
    v-model="myForm"
    :form-element="myFormElement"
    :errors="errors"
  />
</div>

Options

props type optional usage
form-elements FormElement no Your form schema
errors FormElementError yes Your custom errors

Related Packages

@agtm/nuxt-form

Gerador de Formulário para o nuxt framework

2,560 1
@nathanchase/nuxt-dayjs-module

This is a Nuxt 3 compatible module built with the official Nuxt 3 (module-builde...

19,376 31
@ederzeel/nuxt-schema-form-nightly

A runtime form generator for nuxt

5,610 0
cap-socket

Functions developed by Cap to establish real-time and persistent communication w...

968

Version History

Version Released Vue License
1.10.0 ^3.0 MIT
1.9.0 ^3.0 MIT
1.8.1 ^3.0 MIT
1.7.0 ^3.0 MIT
1.6.0 ^3.0 MIT