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
| startIndex | number | Indicate the wizard to start at the given step | ❌ | 0 |
85
85
| header | React.ReactNode | Header that is shown above the active step | ❌ ||
86
+
| sidebar | React.ReactNode | Sidebar that is shown after the header, before the active step | ❌ ||
86
87
| footer | React.ReactNode | Footer that is shown below the active stepstep | ❌ ||
87
88
| onStepChange | (stepIndex) | Callback that will be invoked with the new step index when the wizard changes steps | ❌ ||
88
-
| wrapper | React.React.ReactElement | Optional wrapper that is exclusively wrapped around the active step component. It is not wrapped around the `header` and `footer`| ❌ ||
89
+
| wrapper | React.React.ReactElement | Optional wrapper that is exclusively wrapped around the active step component. It is not wrapped around the `header`, `sidebar` and `footer`| ❌ ||
90
+
| sidebarAndStepWrapper | React.React.ReactElement | Optional wrapper that is exclusively wrapped around the sidebar and active step component. It is not wrapped around the `header` and `footer`| ❌ ||
89
91
| children | React.ReactNode | Each child component will be treated as an individual step | ✔️ |
90
92
91
93
#### Example
@@ -94,19 +96,27 @@ Example: pass a footer component that contains a "previous" and "next" button to
94
96
// Example: show the active step in the header
95
97
constHeader= () =><p>I am the header component</p>;
96
98
99
+
// Example: show the a sidebar
100
+
constSidebar= () =><p>I am the sidebar component</p>;
101
+
97
102
// Example: show the "previous" and "next" buttons in the footer
98
103
constFooter= () =><p>I am the footer component</p>;
99
104
100
-
// Example: Wrap steps in an `<AnimatePresence` from framer-motion
105
+
// Example: Wrap steps in an `<AnimatePresence` from framer-motion
@@ -137,6 +147,7 @@ Used to retrieve all methods and properties related to your wizard. Make sure `W
137
147
| stepCount | number | The total number of steps of the wizard |
138
148
| isFirstStep | boolean | Indicate if the current step is the first step (aka no previous step) |
139
149
| isLastStep | boolean | Indicate if the current step is the last step (aka no next step) |
150
+
| stepNames | { name: string; number: string }[]| An array of objects for each step in the wizard. Each object has a `name` and `number` property corresponding to the step's name and number. |
0 commit comments