StepperComponent

1 Oct 20256 minutes to read

Represents the EJ2 Angular Stepper Component.

<nav ejs-stepper [steps]='stepItems'></nav>

Properties

activeStep number

Defines the current step index of the Stepper.

<ejs-stepper id="stepper" [steps]="steps" activeStep="2"></ejs-stepper>
import { Component,ViewChild, ViewEncapsulation } from "@angular/core";
import { StepModel, Stepper } from '@syncfusion/ej2-angular-navigations';

@Component({
  selector: "app-root",
  templateUrl: "app.component.html",
  styles: [`app.component.css`],
  encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public steps: StepModel[] = [{}, {}, {}, {}, {}];
}

Defaults to 0

animation StepperAnimationSettingsModel

Defines the step progress animation of the Stepper.

<ejs-stepper id="stepper" [steps]="steps" [animation]="animation"></ejs-stepper>
import { Component,ViewChild, ViewEncapsulation } from "@angular/core";
import { StepModel, Stepper, AnimationModel } from '@syncfusion/ej2-angular-navigations';

@Component({
  selector: "app-root",
  templateUrl: "app.component.html",
  styles: [`app.component.css`],
  encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public steps: StepModel[] = [{}, {}, {}, {}, {}];
    public animation: AnimationModel = {enable: true, duration: 2000, delay: 1000};
}

cssClass string

Defines the CSS class to customize the Stepper appearance.

Defaults to ’’

enablePersistence boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableRtl boolean

Enable or disable rendering component in right to left direction.

Defaults to false

labelPosition string|StepLabelPosition

Defines the label position in the Stepper.
The possible values are:

  • Top
  • Bottom
  • Start
  • End
<ejs-stepper id="stepper" [steps]="steps" labelPosition="Bottom"></ejs-stepper>
import { Component,ViewChild, ViewEncapsulation } from "@angular/core";
import { StepModel, Stepper } from '@syncfusion/ej2-angular-navigations';

@Component({
  selector: "app-root",
  templateUrl: "app.component.html",
  styles: [`app.component.css`],
  encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public steps: StepModel[] = [
        { icon: 'sf-icon-shopping-02', label: 'Ordered' },
        { icon: 'sf-icon-van-02-wf', label: 'Dispatched' },
        { icon: 'sf-icon-supplier1', label: 'Out for delivery' },
        { icon: 'sf-icon-supplier2', label: 'Arrived' }
    ];
}

Defaults to StepLabelPosition.Bottom

linear boolean

Defines whether allows to complete one step in order to move to the next or not.

<ejs-stepper id="stepper" [steps]="steps" linear="true"></ejs-stepper>
import { Component,ViewChild, ViewEncapsulation } from "@angular/core";
import { StepModel, Stepper } from '@syncfusion/ej2-angular-navigations';

@Component({
  selector: "app-root",
  templateUrl: "app.component.html",
  styles: [`app.component.css`],
  encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public steps: StepModel[] = [{}, {}, {}, {}, {}];
}

Defaults to false

locale string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to ’’

orientation string|StepperOrientation

Defines the orientation type of the Stepper.
The possible values are:

  • Horizontal
  • vertical

Defaults to StepperOrientation.Horizontal

readOnly boolean

Defines whether the read-only mode is enabled for a Stepper control, which means that the user will not be able to interact with it.

Defaults to false

showTooltip boolean

Defines a value that defines whether to show tooltip or not on each step.

Defaults to false

stepType string|StepType

Defines whether steps are display with only indicator, only labels or combination of both.
The possible values are:

  • Default
  • Label
  • Indicator
<ejs-stepper id="stepper" [steps]="steps" stepType="Indicator"></ejs-stepper>
import { Component,ViewChild, ViewEncapsulation } from "@angular/core";
import { StepModel, Stepper } from '@syncfusion/ej2-angular-navigations';

@Component({
  selector: "app-root",
  templateUrl: "app.component.html",
  styles: [`app.component.css`],
  encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public steps: StepModel[] = [
        { icon: 'sf-icon-shopping-02', label: 'Ordered' },
        { icon: 'sf-icon-van-02-wf', label: 'Dispatched' },
        { icon: 'sf-icon-supplier1', label: 'Out for delivery' },
        { icon: 'sf-icon-supplier2', label: 'Arrived' }
    ];
}

Defaults to StepType.Default

steps StepModel[]

Defines the list of steps.

Defaults to []

template string|object

Defines the template content for each step.

<ejs-stepper id="stepper" [steps]="steps" [template]='<span>${currentStep}</span>'></ejs-stepper>
import { Component,ViewChild, ViewEncapsulation } from "@angular/core";
import { StepModel, Stepper } from '@syncfusion/ej2-angular-navigations';

@Component({
  selector: "app-root",
  templateUrl: "app.component.html",
  styles: [`app.component.css`],
  encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public steps: StepModel[] = [{}, {}, {}, {}, {}];
}

Defaults to ’’

tooltipTemplate string|object

Defines the template content for the tooltip.

Defaults to ’’

Methods

destroy

Destroy the stepper control.

Returns void

nextStep

Move to next step from current step in Stepper.

Returns void

previousStep

Move to previous step from current step in Stepper.

Returns void

refreshProgressbar

Refreshes the position of the progress bar programmatically when the dimensions of the parent container are changed.

Returns void

reset

Reset the state of the Stepper and move to the first step.

Returns void

Events

beforeStepRender EmitType<StepperRenderingEventArgs>

Event triggers before rendering each step.

created EmitType<Event>

Event callback that is raised after rendering the stepper.

stepChanged EmitType<StepperChangedEventArgs>

Event triggers after active step changed.

stepChanging EmitType<StepperChangingEventArgs>

Event triggers before active step change.

stepClick EmitType<StepperClickEventArgs>

Event triggers when clicked on step.