A dynamic form generator application built with Vue 3, TypeScript, Vuex, Vue Router, and SCSS.
The goal of this project is to implement a reusable, highly customizable form generator component that can render forms dynamically based on a provided structure. The application demonstrates the flexibility and power of Vue 3's Composition API, TypeScript, and modern frontend best practices.
- Reusable Form Generator Component
Supportsinput
,select
,checkbox
,textarea
, and action buttons. - Dynamic Form Rendering
Accepts a structure object describing fields (labels, attributes, etc.) and a values object (viav-model
), which can be server-driven or hardcoded. - Customizable Fields via Slots
Each field can be customized using Vue slots for maximum flexibility. - Event Handling
Save and cancel actions are fully handled and can be integrated with Vuex/localStorage. - Demo Pages
Multiple demo pages with various form structures to showcase component capabilities. - Modern Stack
Built with Vue 3, TypeScript, Vuex, Vue Router, and SCSS. Uses Composition API and best practices for scalable frontend development.
- Form structure and values are fully dynamic and type-safe.
- Custom slot support for field-level customization.
- State management with Vuex and persistent storage via localStorage.
- Routing for switching between different form demos.
- Clean, maintainable codebase using the latest Vue 3 conventions.
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser at:
http://localhost:5173 (or the port shown in your terminal) -
Build for production:
npm run build
-
Lint and format code:
npm run lint npm run format
- Visit the home page to see available form demos.
- Select a form type to view and interact with a dynamic form.
- Try customizing fields using slots and see how the form generator adapts.
- Save and cancel actions demonstrate integration with Vuex and localStorage.