Introduction
Last updated
Last updated
React Advanced Form is a library for tailoring real-world forms in React with pleasure and ease.
Our primary goal is to educate developers to trust and expect a form to do more than just rendering the fields. Our features are designed to handle cumbersome use cases with clean and performant code.
Each field interaction or update is a function that produces the next state of a field.
React Advanced Form is field-centric. That means that you define field components and reuse them throughout the entire application. Utilize reach field API to reflect even the most granular field state changes in the user interface.
Form declaration must be simple, easy to read and maintain.
Select the field(s) based on type or name, and declare validation resolver functions.
Access the field's value
, fieldProps
and the form
as the parameters of each resolver function. Say goodbye to crowded validate
functions, welcome clean validation schemas!
How much effort would it take you to make one field required based on another field(s)? Yes, the correct answer is—one line of code:
Get as many data from the sibling fields as needed, and build your logic on that. Embrace the power of reactive programming, which re-evaluates a resolver function whenever the referenced field props update.
Designed to tackle API misalignment, field grouping allows to control the serialized data structure of a form on the layout level. Take advantage of nested, split or exact groups.
The form above serializes into the following JSON:
Turn any component (including a third-party one) into a field, which validates, serializes, and behaves just as any other field. Alternatively, you can build a field with the entirely custom logic.
Make sure to have React (15.0+) installed in your project.
Starting with something new may appear challenging. There is a step-by-step instructions on how to get started with React Advanced Form, which ensure easy and clear integration process.
"Advanced forms in React made easy" — Artem Zakharchenko (Medium)
There is no official support for Internet Explorer. There is no testing conducted for that browser. Consider educating the web and deprecating support for obsolete browsers.
Any of your contributions are highly appreciated! See the Contribution guidelines to get to know the process better. Moreover, development isn't the only way to contribute, there are many more.
Chrome
Firefox
Safari
iOS Safari
Edge
Internet Explorer
65+
57+
9+
8+
41+
–