All Projects β†’ use-form β†’ Use Form

use-form / Use Form

Licence: mit
Build great forms without effort. πŸš€

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Use Form

react-cool-form
😎 πŸ“‹ React hooks for forms state and validation, less code more performant.
Stars: ✭ 246 (+485.71%)
Mutual labels:  hooks, forms, form-validation
React Hook Form
πŸ“‹ React Hooks for form state management and validation (Web + React Native)
Stars: ✭ 24,831 (+59021.43%)
Mutual labels:  hooks, form-validation, forms
Usetheform
React library for composing declarative forms, manage their state, handling their validation and much more.
Stars: ✭ 40 (-4.76%)
Mutual labels:  hooks, form-validation, forms
form-data-json
A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
Stars: ✭ 37 (-11.9%)
Mutual labels:  forms, form-validation
FrontendForms
A module for ProcessWire CMS to create and validate forms on the frontend easily using the Valitron library.
Stars: ✭ 0 (-100%)
Mutual labels:  forms, form-validation
ember-validity-modifier
Ember Octane addon to add custom validity (form validation) to form fields
Stars: ✭ 28 (-33.33%)
Mutual labels:  forms, form-validation
vue-use-form
βœ… A Vue.js composition API function to validate forms
Stars: ✭ 97 (+130.95%)
Mutual labels:  forms, form-validation
formio
Formio, form definition and binding library for Java platform
Stars: ✭ 24 (-42.86%)
Mutual labels:  forms, form-validation
CustomFormViews
A clean collection of views used for forms.
Stars: ✭ 12 (-71.43%)
Mutual labels:  forms, form-validation
React Reactive Form
Angular like reactive forms in React.
Stars: ✭ 259 (+516.67%)
Mutual labels:  form-validation, forms
Formik
Build forms in React, without the tears 😭
Stars: ✭ 29,047 (+69059.52%)
Mutual labels:  hooks, forms
Formidable
PHP 7 form library for handling user input
Stars: ✭ 27 (-35.71%)
Mutual labels:  form-validation, forms
laminas-form
Validate and display simple and complex forms, casting forms to business objects and vice versa
Stars: ✭ 65 (+54.76%)
Mutual labels:  forms, form-validation
react-useForm
World's simplest React hook to manage form state
Stars: ✭ 30 (-28.57%)
Mutual labels:  hooks, form-validation
formz
A unified form representation in Dart used at Very Good Ventures πŸ¦„
Stars: ✭ 262 (+523.81%)
Mutual labels:  forms, form-validation
Resolvers
πŸ“‹ Validation resolvers: Zod, Yup, Joi, Superstruct, and Vest.
Stars: ✭ 222 (+428.57%)
Mutual labels:  hooks, form-validation
Fielder
A field-first form library for React and React Native
Stars: ✭ 160 (+280.95%)
Mutual labels:  hooks, forms
React Form
βš›οΈ Hooks for managing form state and validation in React
Stars: ✭ 2,270 (+5304.76%)
Mutual labels:  hooks, forms
grav-plugin-form
Grav Form Plugin
Stars: ✭ 48 (+14.29%)
Mutual labels:  forms, form-validation
Flutter form builder
Simple form maker for Flutter Framework
Stars: ✭ 715 (+1602.38%)
Mutual labels:  form-validation, forms

Logo

Welcome to useForm πŸ‘‹

GitHub license GitHub coverage npm bundle size npm bundle size npm version Tweet

useFom provide a way to create complex forms easily.

🏠 Homepage

✨ Demo

Example in CodeSandbox

Description

Forms are an important part of web applications, and with react it's possible to create greats forms,
react hooks are a game-changer when we think about forms, with hooks is very simple to create forms, and you can go on without libraries.
But when we wanna complex forms with many validations and complex objects with several layer and properties is appropriate to use a library form to manager the state of inputs and its validations.
For this reason, there is useForm, with useForm we can make greats forms and complex validations with less line code.

UseForm provides a way to create complex forms easily, this hook returns an object of values ​​in the same shape that it receives, this is possible using dot notation. Therefore, it does not matter if the object is complex or has many properties or array, the result is the same. This process turns very easily to create forms from an object with several layers, the same layers and properties are replicated in the final object, this approach prevents you to type more code to convert an object from form to backend object type. The same process is realized with errors object and touched objects.

What to expect with useForm

  • Performer forms - useForm provides a way to complete a form and submit it without any rerender, by default useForm creates uncontrolled forms.
  • Easy to write - useForm has an easy way to write forms with less code. register function return necessary input's properties and it is all we need to manage all events in a native HTML input. Writhe forms without form tag.
  • Easy validation - By default useform uses yup validation, we can write complex validation without effort.

Instalation

  npm i @use-form/use-form
  yarn add @use-form/use-form

Usage

useForm provides a register function, this function as a link with input and a object property of form state.


import { useForm } from "@use-form/use-form";

/*
 *  initial Values optional
 */
const initialValues = {
  name: 'Jesse',
  email: '[email protected]',
  score: 25,
}

const {
  register,
  state: { values },
} = useForm({ initialValues, isControlled: true })

Use dot notation to create advanced objects or to map object values. Type an entry name and type or an entry property object.

   <Input placeholder="Name" {...register("name")}/>
   <Input placeholder="E-mail" type="email" {...register("email")}/>
   <Range {...register("score")}/>

Post https://dev.to/jucian0/building-forms-with-useform-1cna

🀝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

πŸ“ License

Copyright Β© 2020 Jucian0.
This project is MIT licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].