@neanic/forms
v9.0.0
Published
The Neanic Forms library
Readme
Neanic Forms Library
Neanic Forms is a powerful TypeScript library for building and managing forms with Vue.js. It provides a flexible and extensible architecture for handling form state, validation, and rendering.
Features
- Easy form state management with Vue reactivity
- Extensible validation logic with both synchronous and asynchronous support
- Customizable form element rendering to fit various UI frameworks
- Seamless integration with Vue.js components and reactivity system
Installation
To install Neanic Forms, use npm or yarn:
npm install @neanic/forms
# or
yarn add @neanic/formsUsage
Here's a basic example of how to use Neanic Forms to create a simple form:
import { Form, Val } from "@neanic/forms";
// Define your form structure
const form = Form.object({
firstName: Form.string([Val.isRequired]),
lastName: Form.string(),
age: Form.number(),
});API Reference
Neanic Forms offers a variety of form-related classes and utilities. Here is a quick overview:
Form: The main factory for creating form controls.FormObject,FormArray,FormString,FormNumber,FormBoolean: Classes representing different types of form entries.Val: A collection of standard validators.formDefaultsForVue: A utility to set default templates for rendering Vue components based on form entry types.
License
This project is licensed under the ISC License – see the LICENSE file for details. Developed by Neanic.
