Skip to content

vue-use-form/vue-use-form

Repository files navigation

vue-use-form

Inspired by react-hook-form, if you love react-hook-form usage, come on and try it!

📝Document | 🤽‍♀️Playground

Install

npm i vue-use-form

🚀Features

  • 🦾 Type Strong: Written in TypeScript
  • 🏆 No Component: No need to import any components to use, you can use it in all UI framework
  • 😍 Easy to use: Just 2 main hooks: useForm, useFieldArray

Quick Start

<script setup lang="ts">
import { useForm } from 'vue-use-form'

interface Inputs {
  username: string
}

const { regsiter } = useForm<Inputs>()
</script>

<template>
  <input
    :="register('username', {
      required: 'username field cannot be empty!'
    })"
  >
</template>

use with schema