0.0.15-beta.0 • Published 6 months ago

@kylegl/vue-hooks-form-monorepo v0.0.15-beta.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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 1 main hooks: useForm
<script setup lang="ts">
import { useForm } from '@vue-hooks-form/core'
interface Inputs {
  username: string
}
const {
  register,
  formState: { errors },
  handleSubmit,
} = useForm<Inputs>()
</script>

<template>
  errors: {{ errors }}
  <form @submit.prevent="handleSubmit()()">
    <input
      :="register('username', {
        required: 'username field cannot be empty!'
      })"
    >
    <button type="submit">
      submit
    </button>
  </form>
</template>

Credits

Thanks to:

License

MIT License © 2023-Present Elone Hoo