vue-formify

esm cjs
Build powerful, type-safe forms in Vue.
Version 2.0.11 License MIT
Keywords
vuevue3formformsformifyvue-formify
INSTALL
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.5.0
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.40
- 0.0.39
- 0.0.38
- 0.0.37
- 0.0.36
- 0.0.35
- 0.0.34
- 0.0.33
- 0.0.32
- 0.0.31
- 0.0.30
- 0.0.29
- 0.0.28
- 0.0.27
- 0.0.26
- 0.0.25
- 0.0.24
- 0.0.23
- 0.0.22
- 0.0.21
- 0.0.20
- 0.0.19
- 0.0.18
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 2.0.0-1
- 2.0.0-0
Build powerful, type-safe forms in Vue.
VueFormify is a form-building library for Vue that simplifies creating both simple and complex forms. It offers type safety, schema validations and a minimal bundle size (~4kb gzipped), making it both secure and efficient.
Features
- Type Safe: Ensures accurate data types and autocompletion across fields.
- Validation: Use schema based validators like
Zod
,Valibot
orArkType
. - Auto Collect Values: Seamlessly gathers form data.
- Supports Nested Objects and Arrays: Easily handle complex data structures.
- Easy Third-Party Integrations: Flexible to work with other libraries.
- Customizable Components: Easily build and integrate custom components.
- Lightweight: Small footprint for a faster, more responsive app.
📚 Documentation
Read more in the documentation
📦 Install
npm i vue-formify
💻 Usage
Basic
<script lang="ts" setup>
import { useForm } from 'vue-formify';
type FormData = {
email: string;
}
const {
Form,
Field,
Error,
handleSubmit,
} = useForm<FormData>();
const sendForm = handleSubmit((data) => {
console.log(data)
})
</script>
<template>
<Form @submit="sendForm">
<Field name="email" />
<Error error-for="email" />
<button>Send</button>
</Form>
</template>
ArkType example
<script lang="ts" setup>
import { type } from 'arktype';
import { useForm } from 'vue-formify';
const { Form, Field, handleSubmit } = useForm({
schema: type({
first_name: 'string >= 1';
last_name: 'string >= 1';
})
});
const sendForm = handleSubmit((data) => {
console.log(data);
});
</script>
<template>
<Form @submit="sendForm">
<Field name="first_name" />
<Field name="last_name" />
<button>Submit</button>
</Form>
</template>