|
| 1 | +# IgxStepperComponent |
| 2 | + |
| 3 | +## Description |
| 4 | +_**IgxStepperComponent** is a collection of **IgxStepComponent**s that delivers a wizard-like workflow:_ |
| 5 | + |
| 6 | +A complete walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/stepper). |
| 7 | +The specification for the stepper can be found [here](https://github.com/IgniteUI/igniteui-angular/wiki/Stepper-Specification) |
| 8 | + |
| 9 | +---------- |
| 10 | + |
| 11 | +## Usage |
| 12 | +```html |
| 13 | +<igx-stepper> |
| 14 | + <igx-step *ngFor="let step of stepsData" [disabled]=”step.disabled”> |
| 15 | + <igx-icon igxStepIndicator> |
| 16 | + {{step.indicator}} |
| 17 | + </igx-icon> |
| 18 | + |
| 19 | + <p igxStepTitle> |
| 20 | + {{step.title}} |
| 21 | + </p> |
| 22 | + |
| 23 | + <div igxStepContent> |
| 24 | + ... |
| 25 | + </div> |
| 26 | + </igx-step> |
| 27 | +</igx-stepper> |
| 28 | +``` |
| 29 | + |
| 30 | +---------- |
| 31 | + |
| 32 | +## Keyboard Navigation |
| 33 | + |
| 34 | +The keyboard can be used to navigate through all steps in the stpper. |
| 35 | + |
| 36 | +_Disabled steps are not counted as visible steps for the purpose of keyboard navigation._ |
| 37 | + |
| 38 | +|Keys |Description| |
| 39 | +|---------------|-----------| |
| 40 | +| ARROW DOWN | Focuses the next step header in a vertical stepper. | |
| 41 | +| ARROW UP | Focuses the previous step header in a vertical stepper. | |
| 42 | +| TAB | Moves the focus to the next tabbable element. | |
| 43 | +| SHIFT + TAB | Moves the focus to the previous tabbable element. | |
| 44 | +| HOME | Moves the focus to the header of the FIRST enabled step in the _igx-stepper_ | |
| 45 | +| END | Moves the focus to the header of the LAST enabled step in the _igx-stepper_ | |
| 46 | +| ARROW RIGHT | Moves the focus to the header of the next accessible step in both orientations. | |
| 47 | +| ARROW LEFT | Moves the focus to the header of the previous accessible step in both orientations. | |
| 48 | +| ENTER / SPACE | Activates the currently focused step. | |
| 49 | +| CLICK | Activates the currently focused step. | |
| 50 | + |
| 51 | +_By design when the user presses the **Tab** key over the step header the focus will move to the step content container. In case the container should be skipped the developer should set the content container [tabIndex]="-1"_ |
| 52 | + |
| 53 | +---------- |
| 54 | + |
| 55 | +## API Summary |
| 56 | + |
| 57 | +### IgxStepperComponent |
| 58 | + |
| 59 | +#### Accessors |
| 60 | + |
| 61 | +**Get** |
| 62 | + |
| 63 | + | Name | Description | Type | |
| 64 | + |----------------|------------------------------------------------------------------------------|---------------------| |
| 65 | + | steps | Gets the steps that are rendered in the stepper. | `IgxStepComponent[]` | |
| 66 | + |
| 67 | + |
| 68 | +#### Properties |
| 69 | + |
| 70 | + | Name | Description | Type | |
| 71 | + |----------------|------------------------------------------------------------------------------|----------------------------------------| |
| 72 | + | id | The id of the stepper. Bound to attr.id | `string` | |
| 73 | + | orientation | Gets/sets the orientation of the stepper. Default is `horizontal`. | `IgxStepperOrientation` | |
| 74 | + | stepType| Gets/sets the type of the steps in the stepper. Default value is `full` | `IgxStepType` | |
| 75 | + | titlePosition | Gets/sets the position of the titles in the stepper. Default value is `bottom` when the stepper is horizontally orientated and `end` when the layout is set to vertical. | `IgxStepperTitlePosition` | |
| 76 | + | linear | Whether the validity of previous steps should be checked and only in case, it's valid to be able to move forward or not. Default value is `false`. | `boolean` | |
| 77 | + | contentTop| Whether the steps content should be displayed above the steps header when the stepper orientation is Horizontal. Default value is `false`. | `boolean` | |
| 78 | + | verticalAnimationType | Gets/sets the animation type of the stepper when the orientation direction is vertical. Default value is `grow`. | `VerticalAnimationType` | |
| 79 | + | horizontalAnimationType | Gets/sets the animation type of the stepper when the orientation direction is horizontal. Default value is `slide`. |`HorizontalAnimationType` | |
| 80 | + | animationDuration | 320 | `number` | |
| 81 | + |
| 82 | +#### Methods |
| 83 | + | Name | Description | Parameters | Returns | |
| 84 | + |-----------------|----------------------------|-------------------------|--------| |
| 85 | + | navigateTo | Activates the step given by index. | `index: number` | `void` | |
| 86 | + | next | Activates the next enabled step. | | `void` | |
| 87 | + | prev | Activates the previous enabled step. | | `void` | |
| 88 | + | reset | Resets the stepper to its initial state. | | `void` | |
| 89 | + |
| 90 | +#### Events |
| 91 | + |
| 92 | + | Name | Description | Cancelable | Arguments | |
| 93 | + |----------------|-------------------------------------------------------------------------|------------|------------| |
| 94 | + | activeStepChanging | Emitted when the active step is about to change. | true | `{ oldIndex: number, newIndex: number, owner: IgxStepperComponent, cancel: boolean }` | |
| 95 | + | activeStepChanged | Emitted when the active step is changed. | false | `{ index: number, owner: IgxStepperComponent }` | |
| 96 | +### IgxStepComponent |
| 97 | + |
| 98 | +#### Accessors |
| 99 | + |
| 100 | +**Get** |
| 101 | + |
| 102 | + | Name | Description | Type | |
| 103 | + |-----------------|-------------------------------------------------------------------------------|---------------------| |
| 104 | + | index | Gets the step index inside of the stepper. | `number` | |
| 105 | + |
| 106 | +#### Properties |
| 107 | + |
| 108 | + | Name | Description | Type | |
| 109 | + |-----------------|-------------------------------------------------------------------------------|---------------------| |
| 110 | + | id | The id of the step. Bound to attr.id | `string` | |
| 111 | + | disabled | Gets/sets whether the step is interactable. | `boolean` | |
| 112 | + | active | Gets/sets whether the step is activе. Two-way data binding. | `boolean` | |
| 113 | + | optional | Gets/sets whether the step is optional. | `boolean` | |
| 114 | + | complete | Gets/sets whether the step is completed. | `boolean` | |
| 115 | + | isValid | Gets/sets whether the step is valid. Default value is `true`. | `boolean` | |
| 116 | + |
| 117 | +#### Events |
| 118 | + |
| 119 | + | Name | Description | Cancelable | Parameters | |
| 120 | + |-----------------|-------------------------------------------------------------------------------|------------|---------| |
| 121 | + | activeChange | Emitted when the step's active property changes | false | `boolean` | |
| 122 | + |
| 123 | + |
0 commit comments