Implementing Syncfusion React Stepper
The Stepper component guides users through a multi-step workflow or process with visual indicators, step labels, and flexible configuration. It's ideal for wizards, checkout flows, onboarding processes, and any guided user experience requiring sequential navigation.
When to Use This Skill
Use the Stepper component when you need to:
- Guide users through multi-step processes (checkout, registration, setup wizards)
- Display step-by-step workflows with progress indication
- Validate user input before advancing to the next step
- Support linear or non-linear navigation patterns
- Customize appearance with icons, labels, and templates
- Localize content for different languages/regions
Component Overview
Key Capabilities:
- Step Navigation: Horizontal and vertical orientations, sequential or free navigation
- Step Types: Default (icons + labels), label-only, or indicator-only modes
- Events: Track step changes, validations, and interactions
- Styling: Animations, templates, custom CSS, and tooltips
- Accessibility: Full keyboard navigation and ARIA support
- Globalization: Multi-language support and RTL compatibility
Documentation and Navigation Guide
Getting Started & Installation
📄 Read: references/getting-started.md
- Package installation and dependencies
- CSS imports and theme setup
- Creating your first stepper
- Initial configuration and rendering
Core Configuration: Steps and Properties
📄 Read: references/steps-and-configuration.md
- Adding and defining steps with StepDirective
- Icon CSS, text, and label properties
- Active step management
- Disabled states and customization
- CSS class configuration
Layout & Appearance: Orientations and Types
📄 Read: references/orientations-and-types.md
- Horizontal and vertical orientations
- Step type modes (Default, Label, Indicator)
- Label positioning (Top, Bottom, Start, End)
- RTL support and responsive design
Interaction & Behavior: Events
📄 Read: references/events-and-interactions.md
- Lifecycle events: created, stepChanged, stepChanging
- User interaction events: stepClick, beforeStepRender
- Event arguments and handling patterns
- Preventing unwanted transitions
Workflow Control: Linear Flow and Validation
📄 Read: references/linear-flow-and-validation.md
- Linear stepper configuration for sequential navigation
- Step validation and status management
- Preventing invalid transitions
- Resetting stepper state
Advanced Styling & Customization
📄 Read: references/animation-template-tooltip.md
- Animation configuration and timing
- Template customization for steps
- Tooltip integration and display
- Custom content rendering
Methods and Advanced Patterns
📄 Read: references/methods-and-advanced.md
- Component methods (reset, etc.)
- Both API patterns (component-based vs property-based)
- Advanced use cases and patterns
- Performance optimization tips
Best Practices: Accessibility & Localization
📄 Read: references/accessibility-globalization.md
- WCAG compliance and ARIA attributes
- Keyboard navigation guidelines
- Globalization and localization
- RTL support implementation
Quick Start Examples
Pattern 1: Component-Based (StepsDirective)
import React from 'react';
import { StepperComponent, StepsDirective, StepDirective } from '@syncfusion/ej2-react-navigations';
import '@syncfusion/ej2-base/styles/tailwind3.css';
import '@syncfusion/ej2-navigations/styles/tailwind3.css';
function App() {
return (
<div>
<StepperComponent>
<StepsDirective>
<StepDirective iconCss="sf-icon-cart" label="Cart" />
<StepDirective iconCss="sf-icon-transport" label="Delivery" />
<StepDirective iconCss="sf-icon-payment" label="Payment" />
<StepDirective iconCss="sf-icon-success" label="Confirmation" />
</StepsDirective>
</StepperComponent>
</div>
);
}
export default App;
Pattern 2: Property-Based (steps Array)
import React from 'react';
import { StepperComponent } from '@syncfusion/ej2-react-navigations';
import '@syncfusion/ej2-base/styles/tailwind3.css';
import '@syncfusion/ej2-navigations/styles/tailwind3.css';
function App() {
const steps = [
{ iconCss: 'sf-icon-cart', label: 'Cart' },
{ iconCss: 'sf-icon-transport', label: 'Delivery' },
{ iconCss: 'sf-icon-payment', label: 'Payment' },
{ iconCss: 'sf-icon-success', label: 'Confirmation' }
];
return (
<div>
<StepperComponent steps={steps} />
</div>
);
}
export default App;
Common Patterns
Pattern 1: Wizard with Validation
const [activeStep, setActiveStep] = React.useState(0);
const stepperRef = React.useRef(null);
const handleStepChanging = (args) => {
// Validate current step before advancing
if (!validateStep(activeStep)) {
args.cancel = true; // Prevent transition
}
};
<StepperComponent
ref={stepperRef}
stepChanging={handleStepChanging}
>
{/* steps */}
</StepperComponent>
Pattern 2: Linear vs Non-Linear Navigation
// Linear: Users must complete steps sequentially
<StepperComponent linear={true}>
// Non-linear: Users can skip to any step
<StepperComponent linear={false}>
Pattern 3: Responsive Orientation
// Auto-switch orientation based on screen size
const [orientation, setOrientation] = React.useState('horizontal');
React.useEffect(() => {
const handleResize = () => {
setOrientation(window.innerWidth < 768 ? 'vertical' : 'horizontal');
};
window.addEventListener('resize', handleResize);
return () => window.removeEventListener('resize', handleResize);
}, []);
<StepperComponent orientation={orientation}>
Key Props and Configuration
Component Properties
| Prop |
Type |
Default |
Purpose |
activeStep |
number |
0 |
Currently active step index |
animation |
StepperAnimationSettingsModel |
undefined |
Animation configuration (enable, duration, delay) |
cssClass |
string |
'' |
CSS class for custom styling |
enablePersistence |
boolean |
false |
Persist component state between page reloads |
enableRtl |
boolean |
false |
Enable right-to-left layout |
labelPosition |
string |
'Bottom' |
Label placement: 'Top', 'Bottom', 'Start', 'End' |
linear |
boolean |
false |
Enforce sequential step navigation |
locale |
string |
'en-US' |
Localization culture code |
orientation |
string |
'horizontal' |
Layout direction: 'horizontal' or 'vertical' |
readOnly |
boolean |
false |
Disable user interaction |
showTooltip |
boolean |
true |
Show tooltips on hover |
stepType |
string |
'Default' |
Visual mode: 'Default', 'Label', 'Indicator' |
steps |
StepModel[] |
[] |
Array of step objects (property-based pattern) |
template |
string | function |
undefined |
Custom template for steps |
tooltipTemplate |
string | function |
undefined |
Custom template for tooltips |
Step Properties (StepModel)
| Property |
Type |
Purpose |
cssClass |
string |
CSS class for individual step styling |
disabled |
boolean |
Disable the step |
iconCss |
string |
Icon CSS class for the step |
isValid |
boolean |
Validation status of the step |
label |
string |
Step label text |
optional |
boolean |
Mark step as optional |
status |
string |
Step status: 'NotStarted', 'InProgress', 'Completed' |
text |
string |
Text content (usually number) |
Animation Settings
| Property |
Type |
Default |
Purpose |
enable |
boolean |
true |
Enable animations |
duration |
number |
400 |
Animation duration in milliseconds |
delay |
number |
0 |
Delay before animation starts |
Events
| Event |
Fires |
Use For |
Arguments |
created |
After component initialization |
Setup, initialization |
Event |
stepChanged |
After step changes |
Update UI, load content |
StepperChangedEventArgs |
stepChanging |
Before step changes |
Validate, prevent transitions |
StepperChangingEventArgs |
stepClick |
User clicks step |
Track interactions |
StepperClickEventArgs |
beforeStepRender |
Before rendering each step |
Customize step appearance |
StepperRenderingEventArgs |
Methods
| Method |
Parameters |
Returns |
Purpose |
reset() |
none |
void |
Reset stepper to initial state (activeStep: 0) |
nextStep() |
none |
void |
Move to next step programmatically |
previousStep() |
none |
void |
Move to previous step programmatically |
refreshProgressbar() |
none |
void |
Refresh progress bar on container resize |
destroy() |
none |
void |
Destroy component and release resources |
Event Arguments Reference:
- StepperChangedEventArgs: activeStep, previousStep, isInteracted, name, event, element
- StepperChangingEventArgs: activeStep, previousStep, cancel, isInteracted, name, event, element
- StepperClickEventArgs: activeStep, name, event, element
- StepperRenderingEventArgs: activeStep, name, element
Common Use Cases
- E-Commerce Checkout: Multi-step checkout flow with order review, shipping, payment
- User Registration: Multi-step signup with email, profile, verification
- Setup Wizards: Software onboarding with configuration steps
- Survey Forms: Step-by-step questionnaire with progress indication
- Installation Guides: Installation steps with instructions and validation
1---
2name: syncfusion-react-stepper
3description: "Implement and configure the Syncfusion React Stepper component for guided workflows. Use this skill when creating step-by-step navigation flows, multi-step forms, wizards, or process guides in React. This skill covers step configuration, orientation (horizontal/vertical), events, validation, animations, templates, accessibility, and globalization support for linear or non-linear workflows."
4metadata:
5 author: "Syncfusion Inc"
6 version: "34.1.29"
7---
8
9# Implementing Syncfusion React Stepper
10
11The Stepper component guides users through a multi-step workflow or process with visual indicators, step labels, and flexible configuration. It's ideal for wizards, checkout flows, onboarding processes, and any guided user experience requiring sequential navigation.
12
13## When to Use This Skill
14
15Use the Stepper component when you need to:
16- Guide users through multi-step processes (checkout, registration, setup wizards)
17- Display step-by-step workflows with progress indication
18- Validate user input before advancing to the next step
19- Support linear or non-linear navigation patterns
20- Customize appearance with icons, labels, and templates
21- Localize content for different languages/regions
22
23## Component Overview
24
25**Key Capabilities:**
26- **Step Navigation:** Horizontal and vertical orientations, sequential or free navigation
27- **Step Types:** Default (icons + labels), label-only, or indicator-only modes
28- **Events:** Track step changes, validations, and interactions
29- **Styling:** Animations, templates, custom CSS, and tooltips
30- **Accessibility:** Full keyboard navigation and ARIA support
31- **Globalization:** Multi-language support and RTL compatibility
32
33## Documentation and Navigation Guide
34
35### Getting Started & Installation
36📄 **Read:** [references/getting-started.md](references/getting-started.md)
37- Package installation and dependencies
38- CSS imports and theme setup
39- Creating your first stepper
40- Initial configuration and rendering
41
42### Core Configuration: Steps and Properties
43📄 **Read:** [references/steps-and-configuration.md](references/steps-and-configuration.md)
44- Adding and defining steps with StepDirective
45- Icon CSS, text, and label properties
46- Active step management
47- Disabled states and customization
48- CSS class configuration
49
50### Layout & Appearance: Orientations and Types
51📄 **Read:** [references/orientations-and-types.md](references/orientations-and-types.md)
52- Horizontal and vertical orientations
53- Step type modes (Default, Label, Indicator)
54- Label positioning (Top, Bottom, Start, End)
55- RTL support and responsive design
56
57### Interaction & Behavior: Events
58📄 **Read:** [references/events-and-interactions.md](references/events-and-interactions.md)
59- Lifecycle events: created, stepChanged, stepChanging
60- User interaction events: stepClick, beforeStepRender
61- Event arguments and handling patterns
62- Preventing unwanted transitions
63
64### Workflow Control: Linear Flow and Validation
65📄 **Read:** [references/linear-flow-and-validation.md](references/linear-flow-and-validation.md)
66- Linear stepper configuration for sequential navigation
67- Step validation and status management
68- Preventing invalid transitions
69- Resetting stepper state
70
71### Advanced Styling & Customization
72📄 **Read:** [references/animation-template-tooltip.md](references/animation-template-tooltip.md)
73- Animation configuration and timing
74- Template customization for steps
75- Tooltip integration and display
76- Custom content rendering
77
78### Methods and Advanced Patterns
79📄 **Read:** [references/methods-and-advanced.md](references/methods-and-advanced.md)
80- Component methods (reset, etc.)
81- Both API patterns (component-based vs property-based)
82- Advanced use cases and patterns
83- Performance optimization tips
84
85### Best Practices: Accessibility & Localization
86📄 **Read:** [references/accessibility-globalization.md](references/accessibility-globalization.md)
87- WCAG compliance and ARIA attributes
88- Keyboard navigation guidelines
89- Globalization and localization
90- RTL support implementation
91
92## Quick Start Examples
93
94### Pattern 1: Component-Based (StepsDirective)
95
96```jsx
97import React from 'react';
98import { StepperComponent, StepsDirective, StepDirective } from '@syncfusion/ej2-react-navigations';
99import '@syncfusion/ej2-base/styles/tailwind3.css';
100import '@syncfusion/ej2-navigations/styles/tailwind3.css';
101
102function App() {
103 return (
104 <div>
105 <StepperComponent>
106 <StepsDirective>
107 <StepDirective iconCss="sf-icon-cart" label="Cart" />
108 <StepDirective iconCss="sf-icon-transport" label="Delivery" />
109 <StepDirective iconCss="sf-icon-payment" label="Payment" />
110 <StepDirective iconCss="sf-icon-success" label="Confirmation" />
111 </StepsDirective>
112 </StepperComponent>
113 </div>
114 );
115}
116
117export default App;
118```
119
120### Pattern 2: Property-Based (steps Array)
121
122```jsx
123import React from 'react';
124import { StepperComponent } from '@syncfusion/ej2-react-navigations';
125import '@syncfusion/ej2-base/styles/tailwind3.css';
126import '@syncfusion/ej2-navigations/styles/tailwind3.css';
127
128function App() {
129 const steps = [
130 { iconCss: 'sf-icon-cart', label: 'Cart' },
131 { iconCss: 'sf-icon-transport', label: 'Delivery' },
132 { iconCss: 'sf-icon-payment', label: 'Payment' },
133 { iconCss: 'sf-icon-success', label: 'Confirmation' }
134 ];
135
136 return (
137 <div>
138 <StepperComponent steps={steps} />
139 </div>
140 );
141}
142
143export default App;
144```
145
146## Common Patterns
147
148### Pattern 1: Wizard with Validation
149```jsx
150const [activeStep, setActiveStep] = React.useState(0);
151const stepperRef = React.useRef(null);
152
153const handleStepChanging = (args) => {
154 // Validate current step before advancing
155 if (!validateStep(activeStep)) {
156 args.cancel = true; // Prevent transition
157 }
158};
159
160<StepperComponent
161 ref={stepperRef}
162 stepChanging={handleStepChanging}
163>
164 {/* steps */}
165</StepperComponent>
166```
167
168### Pattern 2: Linear vs Non-Linear Navigation
169```jsx
170// Linear: Users must complete steps sequentially
171<StepperComponent linear={true}>
172
173// Non-linear: Users can skip to any step
174<StepperComponent linear={false}>
175```
176
177### Pattern 3: Responsive Orientation
178```jsx
179// Auto-switch orientation based on screen size
180const [orientation, setOrientation] = React.useState('horizontal');
181
182React.useEffect(() => {
183 const handleResize = () => {
184 setOrientation(window.innerWidth < 768 ? 'vertical' : 'horizontal');
185 };
186 window.addEventListener('resize', handleResize);
187 return () => window.removeEventListener('resize', handleResize);
188}, []);
189
190<StepperComponent orientation={orientation}>
191```
192
193## Key Props and Configuration
194
195### Component Properties
196
197| Prop | Type | Default | Purpose |
198|------|------|---------|---------|
199| `activeStep` | number | 0 | Currently active step index |
200| `animation` | StepperAnimationSettingsModel | undefined | Animation configuration (enable, duration, delay) |
201| `cssClass` | string | '' | CSS class for custom styling |
202| `enablePersistence` | boolean | false | Persist component state between page reloads |
203| `enableRtl` | boolean | false | Enable right-to-left layout |
204| `labelPosition` | string | 'Bottom' | Label placement: 'Top', 'Bottom', 'Start', 'End' |
205| `linear` | boolean | false | Enforce sequential step navigation |
206| `locale` | string | 'en-US' | Localization culture code |
207| `orientation` | string | 'horizontal' | Layout direction: 'horizontal' or 'vertical' |
208| `readOnly` | boolean | false | Disable user interaction |
209| `showTooltip` | boolean | true | Show tooltips on hover |
210| `stepType` | string | 'Default' | Visual mode: 'Default', 'Label', 'Indicator' |
211| `steps` | StepModel[] | [] | Array of step objects (property-based pattern) |
212| `template` | string \| function | undefined | Custom template for steps |
213| `tooltipTemplate` | string \| function | undefined | Custom template for tooltips |
214
215### Step Properties (StepModel)
216
217| Property | Type | Purpose |
218|----------|------|---------|
219| `cssClass` | string | CSS class for individual step styling |
220| `disabled` | boolean | Disable the step |
221| `iconCss` | string | Icon CSS class for the step |
222| `isValid` | boolean | Validation status of the step |
223| `label` | string | Step label text |
224| `optional` | boolean | Mark step as optional |
225| `status` | string | Step status: 'NotStarted', 'InProgress', 'Completed' |
226| `text` | string | Text content (usually number) |
227
228### Animation Settings
229
230| Property | Type | Default | Purpose |
231|----------|------|---------|---------|
232| `enable` | boolean | true | Enable animations |
233| `duration` | number | 400 | Animation duration in milliseconds |
234| `delay` | number | 0 | Delay before animation starts |
235
236### Events
237
238| Event | Fires | Use For | Arguments |
239|-------|-------|---------|-----------|
240| `created` | After component initialization | Setup, initialization | Event |
241| `stepChanged` | After step changes | Update UI, load content | StepperChangedEventArgs |
242| `stepChanging` | Before step changes | Validate, prevent transitions | StepperChangingEventArgs |
243| `stepClick` | User clicks step | Track interactions | StepperClickEventArgs |
244| `beforeStepRender` | Before rendering each step | Customize step appearance | StepperRenderingEventArgs |
245
246### Methods
247
248| Method | Parameters | Returns | Purpose |
249|--------|-----------|---------|---------|
250| `reset()` | none | void | Reset stepper to initial state (activeStep: 0) |
251| `nextStep()` | none | void | Move to next step programmatically |
252| `previousStep()` | none | void | Move to previous step programmatically |
253| `refreshProgressbar()` | none | void | Refresh progress bar on container resize |
254| `destroy()` | none | void | Destroy component and release resources |
255
256**Event Arguments Reference:**
257- **StepperChangedEventArgs:** activeStep, previousStep, isInteracted, name, event, element
258- **StepperChangingEventArgs:** activeStep, previousStep, cancel, isInteracted, name, event, element
259- **StepperClickEventArgs:** activeStep, name, event, element
260- **StepperRenderingEventArgs:** activeStep, name, element
261
262## Common Use Cases
263
264- **E-Commerce Checkout:** Multi-step checkout flow with order review, shipping, payment
265- **User Registration:** Multi-step signup with email, profile, verification
266- **Setup Wizards:** Software onboarding with configuration steps
267- **Survey Forms:** Step-by-step questionnaire with progress indication
268- **Installation Guides:** Installation steps with instructions and validation