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