@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
:warning: This package is under development stay tuned. :warning:
Nuxt3 Typescript Simple formbuilder
Features
Quick Setup
- Add
@creatiwity/formbuilderdependency to your project
# Using pnpm
pnpm add @creatiwity/formbuilder
# Using yarn
yarn add @creatiwity/formbuilder
# Using npm
npm install @creatiwity/formbuilder
- Add
@creatiwity/formbuilderto themodulessection ofnuxt.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
@nathanchase/nuxt-dayjs-module
This is a Nuxt 3 compatible module built with the official Nuxt 3 (module-builde...
19,376
31
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 | |
| 1.5.1 | ^3.0 | MIT | |
| 1.5.0 | ^3.0 | MIT | |
| 1.4.0 | ^3.0 | MIT | |
| 1.3.3 | ^3.0 | MIT | |
| 1.3.2 | ^3.0 | MIT | |
| 1.3.1 | ^3.0 | MIT | |
| 1.3.0 | ^3.0 | MIT | |
| 1.2.0 | ^3.0 | MIT | |
| 1.1.11 | ^3.0 | MIT | |
| 1.1.10 | ^3.0 | MIT | |
| 1.1.9 | ^3.0 | MIT | |
| 1.1.8 | ^3.0 | MIT | |
| 1.1.7 | ^3.0 | MIT | |
| 1.1.6 | ^3.0 | MIT | |
| 1.1.4 | ^3.0 | MIT | |
| 1.1.3 | ^3.0 | MIT | |
| 1.1.2 | ^3.0 | MIT | |
| 1.1.1 | ^3.0 | MIT | |
| 1.1.0 | ^3.0 | MIT | |
| 1.0.19 | ^3.0 | MIT | |
| 1.0.18 | ^3.0 | MIT | |
| 1.0.17 | ^3.0 | MIT | |
| 1.0.16 | ^3.0 | MIT | |
| 1.0.15 | ^3.0 | MIT | |
| 1.0.14 | ^3.0 | MIT |
Showing the latest 30 of 38. See every release on npm