xinnian999/vue-form-craft
AI 驱动的 Vue3 表单设计器
Vue Form Craft – Quick Overview
What it is: A Vue 3‑based library that lets you design and render forms from a JSON schema. It includes a visual drag‑and‑drop form builder (FormDesign) and a runtime renderer (FormRender). The package also offers optional AI assistance for generating or editing the schema.
Key capabilities
- Visual designer – drag components to create a
JsonSchema. - Renderer –
FormRenderconsumes that schema to produce a working form. - Complex logic – field‑level expressions, data/attribute linking, nested arrays (
FormList). - Validation – built‑in rules (required, min/max, pattern, custom JS).
- AI‑assisted schema creation – plug in any LLM endpoint via a simple
aifunction. - UI adapters – works with Element Plus out of the box; Ant Design Vue can be swapped in.
How you’d use it in a project
- Install the npm package:
npm i vue-form-craft - Register globally, optionally choosing a UI library:
import ElementPlus from 'element-plus' import { createApp } from 'vue' import VueFormCraft from 'vue-form-craft' import 'element-plus/dist/index.css' const app = createApp(App) app.use(ElementPlus) app.use(VueFormCraft) // or app.use(VueFormCraft, { ui: AntdAdapter }) - Render a form with
FormRenderby passing aschemaobject and bindingv-modelto your data. - Or drop the visual builder
FormDesigninto a page to let end‑users create forms on the fly. - To enable AI, provide an
aifunction that calls your LLM endpoint; the library will forward prompts and expect the generated schema text back.
Project layout
lib– source of the publishedvue-form-craftpackage.play– a playground for local development.docs– VitePress site with usage docs and a live demo.
Who it’s for Front‑end teams building admin panels, internal tools, or any Vue 3 app that needs dynamic, schema‑driven forms—especially when you want a low‑code visual editor and optional AI help.
Live demo & docs
Related
- Project
- Project
- Project
- Project