@dragonmastery/zinia-forms
v0.3.0
Published
A modern, type-safe form system for Vue 3 with Zod validation and automatic component generation
Maintainers
Readme
Zinia Forms
A modern, type-safe form system for Vue 3 applications powered by:
- Zod: TypeScript-first schema validation
- Vue 3: Reactivity and component architecture
- TypeScript: End-to-end type safety
- DaisyUI v5: Beautiful UI components for Tailwind CSS v4
🌟 Key Features
- Complete Type Safety: Leverages TypeScript and Zod for end-to-end type safety
- Schema-Driven Forms: Generate forms automatically from Zod schemas
- Rich Field Types: Support for all standard form fields plus custom components
- Component Generation: Automatically generates typed components for each field
- Metadata Registry: Enhance schemas with UI metadata for fine-grained control
- Style Flexibility: Plugin-based style system with built-in DaisyUI and minimal styling options
- Nested Forms: Handle complex nested data structures with ease
- Form State Management: Built-in validation, error handling, and form state
- Smart Form Persistence: Intelligent merging of server and local data
- Automatic Data Loading: Built-in data fetching with loading states
- Reactive Loading States: Track loading, errors, and form readiness
🚀 Quick Start
Installation
# Install Zinia Forms and its peer dependencies
npm install zinia-forms zod vue@3 pinia
# Install UI dependencies (optional, but recommended for beautiful forms)
npm install tailwindcss@latest daisyui@latestBasic Usage
import { z } from 'zod';
import { useForm } from 'zinia-forms';
// Define your schema
const loginSchema = z.object({
email: z.string().email('Please enter a valid email address'),
password: z.string().min(8, 'Password must be at least 8 characters'),
});
// Use in your component
const { form, ZiniaForm, zinia, ZiniaSubmitButton } = useForm(loginSchema);
const handleSubmit = async (data) => {
console.log('Form data:', data);
};<template>
<ZiniaForm :handleSubmit="handleSubmit">
<zinia.EmailField label="Email Address" />
<zinia.PasswordField label="Password" />
<ZiniaSubmitButton submitText="Login" />
</ZiniaForm>
</template>📚 Documentation
For complete documentation, examples, and guides, visit the GitHub repository.
⚖️ License
PROPRIETARY - Evaluation Use Only
This software is proprietary and confidential. This package is provided for:
- ✅ Evaluation and testing in non-production environments
- ✅ Local development and proof-of-concept work
❌ Production use is NOT permitted without a commercial license.
To Use in Production:
You must obtain a commercial license from DragonMastery.
Contact for licensing:
- Visit: https://github.com/DragonMastery/zinia-forms
- Open an issue for licensing inquiries
License Restrictions:
Without a commercial license, you may NOT:
- Use this software in production environments
- Use this software in commercial applications
- Access or study the source code
- Redistribute or share the software
See the LICENSE file for complete terms and conditions.
© 2025 DragonMastery. All rights reserved.
