You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-8
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
-
# react-multi-page-form
1
+

2
2
3
3
This is a tool for managing the sequence and flow of multi-page workflows. Given a long series of screens, it can put them in the proper order makes it easy to show and hide screens based on previous input.
4
4
5
5
Workflows can be composed, allowing you to reuse parts of a flow.
6
6
7
7
This should be used in combination with a component library and validation schema to improve your form management.
8
8
9
-
All of the examples use react-hook-form, but any library could be used.
9
+
An integration with React Hook Form is provided, but the base could be used with any library.
10
+
11
+
[View the docs](https://stutrek.github.io/react-multi-page-form/)
10
12
11
13
## Basic Usage
12
14
@@ -61,6 +63,9 @@ const MyMultiPageForm = () => {
61
63
</>);
62
64
};
63
65
```
66
+
[View the docs](https://stutrek.github.io/react-multi-page-form/)
67
+
68
+
64
69
### Pages and Sequences
65
70
66
71
A **page** represents a single screen that will be shown to the user as part of this multi-step form. It can have as many fields or as few as you'd like. It can even have logic to show and hide fields built in.
@@ -71,18 +76,20 @@ A **sequence** is an array of pages and sequences that represent a specific flow
React Multi Page Form seamlessly integrates into the React ecosystem by focusing exclusively on sequence and flow management. It doesn’t handle UI rendering or data persistence, allowing developers to pair it with their preferred component libraries and state management tools. While it includes integration with React Hook Form, it can also work with Formik, Final Form, or any other React form library.
16
16
17
17
## Why Use React Multi Page Form?
18
18
19
19
-**Streamline Long Forms:** Skip unnecessary pages dynamically based on user inputs.
20
+
-**Easy Testing:** Quickly see the list of pages used for any set of data, and render all pages at once.
20
21
-**Simplified Navigation:** Implement next and previous buttons effortlessly.
21
22
-**Dynamic Form Testing:** Quickly test and determine which forms are displayed to users depending on their selections.
22
23
-**Resume Functionality:** Enable users to pick up where they left off, improving completion rates.
23
24
-**Composable Workflows:** Combine multiple workflows into a single cohesive process, promoting reusability and modularity in form management.
24
25
-**Great for AI:** Clear separation of concerns makes it easy for AI to generate the first draft of your sequences and forms.
25
26
26
-
Ready to simplify your multi-page forms? See the [getting started page](/docs) or check out the [GitHub repository](https://github.com/stutrek/react-multi-page-form).
27
+
Ready to simplify your multi-page forms? See the [getting started page](/react-multi-page-form/docs) or check out the [GitHub repository](https://github.com/stutrek/react-multi-page-form).
Copy file name to clipboardExpand all lines: docs/src/app/docs/page.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ To allow consistent typing throughout the library, you need a single type for yo
29
29
30
30
### Schema
31
31
32
-
This is the shape the data takes for the entirety of the form. Not all of it will be on the screen at the same time, and you'll have a chance to save data when changing pages. This data will be Partial'd, since it won't all be available until the user is done providing it.
32
+
This is the shape the data takes for the entirety of the form. Not all of it will be on the screen at the same time, and you'll have a chance to save data when changing pages. This data will be DeepPartial'd, since it won't all be available until the user is done providing it.
0 commit comments