All Projects β†’ wellyshen β†’ react-cool-form

wellyshen / react-cool-form

Licence: MIT license
😎 πŸ“‹ React hooks for forms state and validation, less code more performant.

Programming Languages

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

Projects that are alternatives of or similar to react-cool-form

React Hook Form
πŸ“‹ React Hooks for form state management and validation (Web + React Native)
Stars: ✭ 24,831 (+9993.9%)
Mutual labels:  hooks, forms, form, form-validation, form-builder, react-hooks
Usetheform
React library for composing declarative forms, manage their state, handling their validation and much more.
Stars: ✭ 40 (-83.74%)
Mutual labels:  hooks, forms, form, form-validation, form-builder
React Final Form
🏁 High performance subscription-based form state management for React
Stars: ✭ 6,781 (+2656.5%)
Mutual labels:  state-management, asynchronous, forms, form, form-validation
Final Form
🏁 Framework agnostic, high performance, subscription-based form state management
Stars: ✭ 2,787 (+1032.93%)
Mutual labels:  state-management, forms, state, form, form-validation
Formium
The headless form builder for the modern web.
Stars: ✭ 78 (-68.29%)
Mutual labels:  hooks, forms, form, form-builder
Formik
Build forms in React, without the tears 😭
Stars: ✭ 29,047 (+11707.72%)
Mutual labels:  hooks, forms, form, react-hooks
React Form
βš›οΈ Hooks for managing form state and validation in React
Stars: ✭ 2,270 (+822.76%)
Mutual labels:  hooks, forms, form, react-hooks
grav-plugin-form
Grav Form Plugin
Stars: ✭ 48 (-80.49%)
Mutual labels:  forms, form, form-validation, form-builder
Fielder
A field-first form library for React and React Native
Stars: ✭ 160 (-34.96%)
Mutual labels:  hooks, forms, state, form
React Reactive Form
Angular like reactive forms in React.
Stars: ✭ 259 (+5.28%)
Mutual labels:  asynchronous, forms, form-validation, form-builder
Form For
ReactJS forms made easy
Stars: ✭ 118 (-52.03%)
Mutual labels:  forms, form, form-validation, form-builder
jedisdb
redis like key-value state management solution for React
Stars: ✭ 13 (-94.72%)
Mutual labels:  hooks, state-management, state, react-hooks
atomic-state
A decentralized state management library for React
Stars: ✭ 54 (-78.05%)
Mutual labels:  hooks, state-management, state, react-hooks
Use Global Context
A new way to use β€œuseContext” better
Stars: ✭ 34 (-86.18%)
Mutual labels:  hooks, state-management, state
Use Form
Build great forms without effort. πŸš€
Stars: ✭ 42 (-82.93%)
Mutual labels:  hooks, forms, form-validation
Pure Store
A tiny immutable store with type safety.
Stars: ✭ 133 (-45.93%)
Mutual labels:  hooks, state-management, state
useSharedState
useSharedState is a simple hook that can be used to share state between multiple React components.
Stars: ✭ 0 (-100%)
Mutual labels:  hooks, state-management, state
Pullstate
Simple state stores using immer and React hooks - re-use parts of your state by pulling it anywhere you like!
Stars: ✭ 683 (+177.64%)
Mutual labels:  hooks, state-management, state
Resolvers
πŸ“‹ Validation resolvers: Zod, Yup, Joi, Superstruct, and Vest.
Stars: ✭ 222 (-9.76%)
Mutual labels:  hooks, form, form-validation
enform
Handle React forms with joy 🍿
Stars: ✭ 38 (-84.55%)
Mutual labels:  state-management, forms, state

⚠️ Thank you for supporting me, this library isn't maintained anymore. Please consider other libraries.



React Cool Form

React hooks for forms state and validation, less code more performant.

npm version npm downloads coverage status All Contributors netlify deploy

Features

Docs

See the documentation at react-cool-form.netlify.app for more information about using React Cool Form!

Frequently viewed docs:

Quick Start

To use React Cool Form, you must use [email protected] or greater which includes hooks. This package is distributed via npm.

$ yarn add react-cool-form
# or
$ npm install --save react-cool-form

Here's the basic concept of how it rocks:

Edit RCF - Quick start

import { useForm } from "react-cool-form";

const Field = ({ label, id, error, ...rest }) => (
  <div>
    <label htmlFor={id}>{label}</label>
    <input id={id} {...rest} />
    {error && <p>{error}</p>}
  </div>
);

const App = () => {
  const { form, use } = useForm({
    // (Strongly advise) Provide the default values
    defaultValues: { username: "", email: "", password: "" },
    // The event only triggered when the form is valid
    onSubmit: (values) => console.log("onSubmit: ", values),
  });
  // We can enable the "errorWithTouched" option to filter the error of an un-blurred field
  // Which helps the user focus on typing without being annoyed by the error message
  const errors = use("errors", { errorWithTouched: true }); // Default is "false"

  return (
    <form ref={form} noValidate>
      <Field
        label="Username"
        id="username"
        name="username"
        // Support built-in validation
        required
        error={errors.username}
      />
      <Field
        label="Email"
        id="email"
        name="email"
        type="email"
        required
        error={errors.email}
      />
      <Field
        label="Password"
        id="password"
        name="password"
        type="password"
        required
        minLength={8}
        error={errors.password}
      />
      <input type="submit" />
    </form>
  );
};

✨ Pretty easy right? React Cool Form is more powerful than you think. Let's explore it now!

Articles / Blog Posts

πŸ’‘ If you have written any blog post or article about React Cool Form, please open a PR to add it here.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Welly

πŸ€” πŸ’» πŸ“– πŸš‡ 🚧

Chris

πŸ›

This project follows the all-contributors specification. Contributions of any kind welcome!

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].