Skip to content

feat: Add Vue 3 integration (@autoform/vue) #199

Description

@mvtandas

Summary

I've built a Vue 3 integration for AutoForm: @mvtandas/autoform-vue

Currently published as @mvtandas/autoform-vue on npm. Would love to contribute this as the official @autoform/vue package.

What it does

  • Automatically renders forms from Zod/Yup schemas in Vue 3
  • Built on @autoform/core — follows the same architecture as @autoform/react
  • Includes: AutoForm component + useAutoForm composable
  • Built-in field components: string, number, boolean, date, select, textarea
  • Nested object support, custom field components, full validation

Usage

<script setup>
import { AutoForm } from '@mvtandas/autoform-vue'
import { ZodProvider } from '@autoform/zod'
import { z } from 'zod'

const schema = new ZodProvider(
  z.object({
    name: z.string().min(2),
    email: z.string().email(),
    role: z.enum(['developer', 'designer']),
  })
)
</script>

<template>
  <AutoForm :schema="schema" @submit="console.log" />
</template>

Links

Happy to move the code into this monorepo if you'd like to make it the official Vue package!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions