All Projects → formstjs → Formst

formstjs / Formst

Licence: mit
Model-driven Form library for React

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Formst

Customui
Library to create custom UI's in MCPE 1.2+
Stars: ✭ 60 (-13.04%)
Mutual labels:  form, forms
React Final Form
🏁 High performance subscription-based form state management for React
Stars: ✭ 6,781 (+9727.54%)
Mutual labels:  form, forms
Unform
Performance-focused API for React forms 🚀
Stars: ✭ 4,340 (+6189.86%)
Mutual labels:  form, forms
Formily
Alibaba Group Unified Form Solution -- Support React/ReactNative/Vue2/Vue3
Stars: ✭ 6,554 (+9398.55%)
Mutual labels:  form, mobx
Usetheform
React library for composing declarative forms, manage their state, handling their validation and much more.
Stars: ✭ 40 (-42.03%)
Mutual labels:  form, forms
Formstate
❤️ Form state so simple that you will fall in love 🌹
Stars: ✭ 357 (+417.39%)
Mutual labels:  form, mobx
Formik
Build forms in React, without the tears 😭
Stars: ✭ 29,047 (+41997.1%)
Mutual labels:  form, forms
mobx-form
Declarative, complex forms with Mobx/React with lots of dynamic/imperative hooks
Stars: ✭ 29 (-57.97%)
Mutual labels:  mobx, forms
Smashing Form
MobX powered forms in React
Stars: ✭ 39 (-43.48%)
Mutual labels:  form, forms
Country Fns
🌏 Useful country data for forms and stuff.
Stars: ✭ 35 (-49.28%)
Mutual labels:  form, forms
Formik Persist
💾 Persist and rehydrate a Formik form to localStorage
Stars: ✭ 345 (+400%)
Mutual labels:  form, forms
Awesomevalidation
Android validation library which helps developer boil down the tedious work to three easy steps.
Stars: ✭ 1,093 (+1484.06%)
Mutual labels:  form, forms
grav-plugin-form
Grav Form Plugin
Stars: ✭ 48 (-30.43%)
Mutual labels:  forms, form
React Hook Form
📋 React Hooks for form state management and validation (Web + React Native)
Stars: ✭ 24,831 (+35886.96%)
Mutual labels:  form, forms
ContactEtc
Laraval package to instantly add a customisable contact form to your site.
Stars: ✭ 21 (-69.57%)
Mutual labels:  forms, form
Form2js
Javascript library for collecting form data
Stars: ✭ 630 (+813.04%)
Mutual labels:  form, forms
react-hubspot
A collection of React hooks for interacting with Hubspot APIs
Stars: ✭ 20 (-71.01%)
Mutual labels:  forms, form
form-js
View and visually edit JSON-based forms.
Stars: ✭ 125 (+81.16%)
Mutual labels:  forms, form
Verticalstepperform
Vertical Stepper Form Library for Android. It follows Google Material Design guidelines.
Stars: ✭ 868 (+1157.97%)
Mutual labels:  form, forms
Mobx React Form
Reactive MobX Form State Management
Stars: ✭ 1,031 (+1394.2%)
Mutual labels:  form, mobx

1) Introduction

Formst is a model-driven library for quickly building high-performance forms in React. Unlike most form libraries that are UI-First, Formst is Data-First.

2) Motivation:

While working on a recent project, GeekyAnts devs realised that there was no easy way to build forms for React apps. Yes, there are solutions available but they're not quite optimal. It is difficult to find a single library that provides great UX, speed and features such as interdependency between form fields. That's when we decided to build Formst, a library that allows you to build high-performance, responsive forms for your React apps.

3) Features

  • High-performance: ****Formst is MST-based which makes it fast and *powerful*.
  • Responsive: Create responsive forms for your React apps with ease.
  • Forms for Everything: Build flat, stepper or nested forms based on your app needs.
  • Middleware: Use middleware to modify form behaviour such as pre-processing input values.

4) Installation

Use 'yarn' or 'npm' to install this library as shown below:

# yarn
yarn add mst-form-creator

# npm
npm add mst-form-creator

5) Dependencies

MobX, mobx-react/mobx-react-lite and MobX-state-tree.

6) Usage

  • Create a form model as shown below:

    const TodoForm = createFormModel(
      'TodoForm',
      {
        title: types.string,
        description: types.string,
      },
    
      {
        validation: {
          title: ['required'],
          description: 'required',
        },
      }
    ).actions(self => ({
      onSubmit: () => {
        setTimeout(() => {
          alert(JSON.stringify(getSnapshot(self), null, 2));
        }, 100);
      },
    }));
    
  • Create an instance of the model:

    const todoForm = TodoForm.create({
      title: '',
      description: '',
    });
    
  • Wrap the components inside MSTForm and use the Field API to render the fields:

    <MSTForm formInstance={todoForm}>
      <form onSubmit={todoForm.handleSubmit}>
        <Field name="title" />
        <ErrorMessage name="title" />
    
        <Field name="description" />
        <ErrorMessage name="description" />
    
        <button type="submit">Submit</button>
      </form>
    </MSTForm>
    

7) Example

This simple login form will take two inputs that are validated on submission. It can also display specific error messages for invalid input values.

8) Tech Stack

React & Javascript.

9) Contributors

10) How to Contribute

Thank you for your interest in contributing to Formst! We are lucky to have you 🙂 Head over to Contribution Guidelines and learn how you can be a part of a wonderful, growing community.

For major changes, please open an issue first to discuss changes and update tests as appropriate.

11) License

Licensed under the MIT License, Copyright © 2020 GeekyAnts. See LICENSE for more information.

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