react-standalone-form
Create React forms with a very minimalistic code, without having to write state management logic on your own. Let everything happening under the hood. A themeable form library based on Context API with a wide selection of user friendly inputs.
Install
yarn add react-standalone-form
Example usage
Quick start:
- Wrap your entitre app into
<FormThemeProvider>
. - Put
<Form>
component anywhere in the app, define each field by adding its name to afields
prop array. - Use any from built-in visual input components to compose a form. Give each input a
name
prop to tell which field from afields
array should be controlled by it. Add other props in order to customize the inputs. - Use
<FormButton>
to trigger a submit function which gives access to all field values formatted in a form of a simple javascript object.
Features
- Built in form state management
- Wide range of UI form components
- Built in form validation system
- Customizable theme and text labels
- Required or optional fields
- Loading state support for asynchronous operations
- Submit action triggered by a submit button or by each change with debounce
- Data collected from forms is well formatted for API calls
- Multiple forms support (being able to put a form into a form as a field group)
- Cross browser tested
- Easy way to create custom own inputs