Bring your own components
EzForm ships zero input components. You register your own design system's Text/Select/Number/whatever components once, and the schema dispatches to them by a `type` key.
Most Vue form libraries bundle a validation library, a set of input components, or both. EzForm bundles neither. It is the layer in between: a schema shape, a state engine, and a renderer that dispatches to your components and runs your validators.
<script setup lang="ts">
import { Form } from 'vue-ez-form'
import { z } from 'zod'
import TextInput from './TextInput.vue' // your own component, not EzForm's
const schema = {
fields: {
email: {
type: 'text',
name: 'email',
label: 'Email',
validate: z.string().email('Invalid email address'),
},
},
}
const componentMap = { text: TextInput }
</script>
<template>
<Form :schema="schema" :component-map="componentMap" @submit="(values) => console.log(values)" />
</template>Head to Getting Started to see this run end to end, or jump straight to the schema shape if you'd rather read the model first.