# Wizard

A wizard is a **step-by-step** process that allows users to input information in **a predefined** order and in which **subsequent steps may depend on** **information entered in previous ones**.

## Usage

Wizards can be used to simplify complex processes performed infrequently or by novice users. By showing less information at a time, they allow users to focus better on the content relevant to each step and decrease the chance of errors.

The Wizard component comes in a horizontal and vertical representation. Vertical wizards stack steps on top of each other, while horizontal ones place them side by side.

![Wizard](<../images/wizard.png>)

Use a horizontal wizard if:

- A small number of steps are used.
- When the wizard should remain accessible on mobile devices.
- When individual steps have longer title.

Use a vertical wizard if:

- A large number of steps are used.
- Enough vertical space is available for a side-by-side representation.

### When to use

- When the task requires multiple steps.
- When complex data input is needed.
- When users need guidance to complete the process.
- When steps vary based on previous decisions.
- When users lack domain knowledge.
- When the user must complete steps in a specific sequence.

### Best practices

- Minimize steps and keep the purpose clear.
- Show where the user is in the process.
- Don't disable or hide the `Back` button.
- Use a horizontal layout for fewer steps or mobile accessibility
- Provide a summary of choices.

## Design

### Elements

![Wizard - elements](<../images/wizard-usage-construction.png>)

> \\1. Indication "*more steps*", 2. Step completed, 3. Current step, 4. Future step, 5. Indication "*more steps*", 6. Label

The vertical variant can also include an optional divider to visually separate steps and content for better clarity. Select the layout that aligns with the process's complexity, content length, and spatial requirements.

![Wizard vertical - divider](<../images/wizard-vertical-divider.png>)

### Wizard button placement

For both the horizontal and the vertical wizard, we recommend to place the buttons below the wizard content.

![Wizard - button placement](<../images/wizard-usage-button-placement.png>)

> 1. Cancel button (optional), 2. Back button, 3. Next button

#### Alternative button placement for horizontal wizard

To ensure a stable position for the controls when the wizard content consumes a significant amount of vertical space, buttons can be positioned alongside the horizontal wizard.

![Wizard - alternative placement](<../images/wizard-usage-alternative-button-placement.png>)

### Responsive behavior

Steps may collapse or hide when space is limited and reappear as more space becomes available. For a vertical wizard, if the screen space becomes too constrained, consider switching to a horizontal layout after a defined breakpoint to preserve clarity.

![Wizard - responsive behavior](<../images/wizard-usage-behavior-n-steps.png>)

### Alternative step representation

Step numbers are useful when users are less familiar with a process and need clear guidance on where they are in a sequence. They establish a clear visual hierarchy, making it evident which step comes before or after the current one, and provide a clear linear progression.

**Note:** Consistency is crucial. If you use the step number representation in one part of your application or website, try to use it for all other cases as well to maintain a cohesive user experience.

![Wizard - alternative step representation](<../images/wizard-usage-steps.png>)

> 1. Standard representation 2. Step number representation

## Code

Shows multiple steps and allows users to click through using back, next, and save buttons.

Add a `WizardStep` to the template for each subtemplate. Define an optional `title` property and an optional `isValid` property. Buttons will only be enabled if `isValid` is true.

The button texts can be configured by optionally setting the `nextText`, `backText`, and `saveText` properties.

Outputs are available for the `save`, `next`, and `back` events.

### Usage

`si-wizard` can be imported using the module

```
import { SiWizardModule } from '@siemens/element-ng/wizard';

@NgModule({
  imports: [SiWizardModule, ...]
})
```

or as a standalone component:

```
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';

@Component({
  imports: [
    SiWizardComponent,
    SiWizardStepComponent,
    ...
  ]
})
```

### Wizard - Standard

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiWizardComponent, SiWizardStepComponent, FormsModule],
  templateUrl: './si-wizard.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  stepIsValid = true;
}
```

Template:

```html
<si-wizard>
  <si-wizard-step heading="Step 1" (next)="logEvent('Step 1 finished!')">
    <h1 class="text-center">Step 1</h1>
  </si-wizard-step>
  <si-wizard-step
    heading="Step 2"
    [isValid]="stepIsValid"
    (next)="logEvent('Step 2 finished!')"
    (back)="logEvent('Going back to step 1!')"
  >
    <h1 class="text-center">Step 2</h1>
    <div class="text-center">
      <label class="form-check mb-2">
        <input type="checkbox" class="form-check-input" [(ngModel)]="stepIsValid" />
        <span class="form-check-label">Check, if the step 2 is valid.</span>
      </label>
    </div>
  </si-wizard-step>
  <si-wizard-step heading="Step 3" [isValid]="false" (save)="logEvent('Step 3 finished!')">
    <h1 class="text-center">Step 3</h1>
  </si-wizard-step>
</si-wizard>
```

### Wizard - Vertical

The vertical wizard layout has an option to show a divider between the steps and the content. It can be enabled by setting the attribute `showVerticalDivider` to `true`. This option can be used in cases where the vertical wizard appears visually disconnected or "floating" within the interface, typically in full-screen layouts.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiWizardComponent, SiWizardStepComponent, FormsModule],
  templateUrl: './si-wizard-vertical.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  stepIsValid = true;
}
```

Template:

```html
<div class="p-5 d-flex flex-column h-100">
  <si-wizard verticalLayout>
    <si-wizard-step heading="Step 1" (next)="logEvent('Step 1 finished!')">
      <h1 class="text-center">Step 1</h1>
    </si-wizard-step>
    <si-wizard-step
      heading="Step 2"
      [isValid]="stepIsValid"
      (next)="logEvent('Step 2 finished!')"
      (back)="logEvent('Going back to step 1!')"
    >
      <h1 class="text-center">Step 2</h1>
      <div class="text-center">
        <label class="form-check mb-2">
          <input type="checkbox" class="form-check-input" [(ngModel)]="stepIsValid" />
          <span class="form-check-label">Check, if the step 2 is valid.</span>
        </label>
      </div>
    </si-wizard-step>
    <si-wizard-step heading="Step 3" [isValid]="false" (save)="logEvent('Step 3 finished!')">
      <h1 class="text-center">Step 3</h1>
    </si-wizard-step>
  </si-wizard>
</div>
```

### Wizard - Responsive

This example has the same settings as the basic example above. It just contains more steps to show the responsiveness the wizard provides. It shrinks and grows with it's given width.

You may resize your screen to see the effect.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { AsyncPipe } from '@angular/common';
import { Component, inject, OnInit } from '@angular/core';
import { SiEmptyStateComponent } from '@siemens/element-ng/empty-state';
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';
import { LOG_EVENT } from '@siemens/live-preview';
import { BehaviorSubject } from 'rxjs';

interface StepInfo {
  heading: string;
  icon: string;
  title: string;
}

@Component({
  selector: 'app-sample',
  imports: [AsyncPipe, SiWizardComponent, SiWizardStepComponent, SiEmptyStateComponent],
  templateUrl: './si-wizard-dynamical.html',
  host: { class: 'p-5' }
})
export class SampleComponent implements OnInit {
  logEvent = inject(LOG_EVENT);
  steps$ = new BehaviorSubject<StepInfo[]>([]);

  ngOnInit(): void {
    setTimeout(() => {
      this.steps$.next([
        {
          heading: 'Step 1',
          icon: 'element-occupied',
          title: 'Occupied'
        },
        {
          heading: 'Step 2',
          icon: 'element-home',
          title: 'Home'
        },
        {
          heading: 'Step 3',
          icon: 'element-unoccupied',
          title: 'Unoccupied'
        },
        {
          heading: 'Step 4',
          icon: 'element-unoccupied-alt',
          title: 'Unoccupied'
        },
        {
          heading: 'Step 5',
          icon: 'element-meeting',
          title: 'Meeting'
        },
        {
          heading: 'Step 6',
          icon: 'element-security-cam',
          title: 'Big brother'
        },
        {
          heading: 'Step 7',
          icon: 'element-oven-on',
          title: 'Bake a cake'
        },
        {
          heading: 'Step 8',
          icon: 'element-badge',
          title: 'Let me in'
        },
        {
          heading: 'Step 9',
          icon: 'element-power-pole',
          title: 'Power'
        }
      ]);
    }, 0);
  }
}
```

Template:

```html
<si-wizard>
  @for (item of steps$ | async; track item) {
    <si-wizard-step
      [heading]="item.heading"
      (back)="logEvent('Back to Step ' + $index + '!')"
      (next)="logEvent('Step ' + ($index + 1) + ' finished!')"
    >
      <si-empty-state [icon]="item.icon" [heading]="item.title" />
    </si-wizard-step>
  }
</si-wizard>
```

### Wizard - Failed

For setting the icon status to failed, add the `failed` attribute and set it to `true`.

If the attribute is not set, the default value will be `false` and the step will behave like the basic example above.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiWizardComponent, SiWizardStepComponent, FormsModule],
  templateUrl: './si-wizard-failed.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  stepIsValid = true;
}
```

Template:

```html
<si-wizard>
  <si-wizard-step heading="Step 1" (next)="logEvent('Step 1 finished!')">
    <h1 class="text-center">Step 1</h1>
  </si-wizard-step>
  <si-wizard-step
    heading="Step 2"
    [failed]="true"
    [isValid]="stepIsValid"
    (next)="logEvent('Step 2 finished!')"
    (back)="logEvent('Going back to step 1!')"
  >
    <h1 class="text-center">Step 2</h1>
    <div class="text-center">
      <label class="form-check mb-2">
        <input type="checkbox" class="form-check-input" [(ngModel)]="stepIsValid" />
        <span class="form-check-label">Check, if the step 2 is valid.</span>
      </label>
    </div>
  </si-wizard-step>
  <si-wizard-step
    heading="Step 3"
    [failed]="false"
    [isValid]="false"
    (save)="logEvent('Step 3 finished!')"
  >
    <h1 class="text-center">Step 3</h1>
  </si-wizard-step>
</si-wizard>
```

### Wizard - Input Validation

This example demonstrates the use of `isNextNavigable` attribute to uncouple enabling/disabling of the `next` button and navigation to next step. This is useful for triggering form validation by `next` button click.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { SiInlineNotificationComponent } from '@siemens/element-ng/inline-notification';
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiWizardComponent, SiWizardStepComponent, SiInlineNotificationComponent, FormsModule],
  templateUrl: './si-wizard-input-validation.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  stepIsNextNavigable = true;
}
```

Template:

```html
<si-wizard>
  <si-wizard-step
    heading="Step 1"
    [isNextNavigable]="stepIsNextNavigable"
    (next)="stepIsNextNavigable ? logEvent('Step 1 finished!') : f.form.markAsDirty()"
    (back)="logEvent('Going back to step 1!')"
  >
    <form #f="ngForm" class="mb-6">
      @if (f.dirty && !f.form.valid) {
        <si-inline-notification
          severity="danger"
          heading="Navigation not possible"
          message="Tick the checkbox"
        />
      }

      <label class="form-check mb-2">
        <input
          type="checkbox"
          class="form-check-input"
          name="validateStep"
          [(ngModel)]="stepIsNextNavigable"
        />
        <span class="form-check-label">Check to make navigation to the next step possible.</span>
      </label>
    </form>
  </si-wizard-step>

  <si-wizard-step heading="Step 2" [isValid]="false" (save)="logEvent('Step 2 finished!')">
    <h1 class="text-center">Step 2</h1>
  </si-wizard-step>
</si-wizard>
```

### Show Completion Page

Add the `enableCompletionPage` attribute and set it to `true` to show a completion page after the wizard is finished.

If the attribute is not set, the wizard will use the default value `false`.

By default, the display duration of the completion page is `3000 ms`. To change them, the `completionPageVisibleTime` attribute must be added and a time in ms must be specified.

The `completionAction` callback will perform a specified function, after the wizard was worked through.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiWizardComponent, SiWizardStepComponent, FormsModule],
  templateUrl: './si-wizard-show-completion-page.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  private router = inject(Router);

  logEvent = inject(LOG_EVENT);
  stepIsValid = true;

  navigateTo(routerLink: any[] | string): void {
    this.router.navigate([routerLink]);
  }
}
```

Template:

```html
<si-wizard
  [enableCompletionPage]="true"
  [completionPageVisibleTime]="3000"
  (completionAction)="navigateTo('main/components/page-layout-&-navigation/si-wizard')"
>
  <si-wizard-step heading="Step 1" (next)="logEvent('Step 1 finished!')">
    <h1 class="text-center">Step 1</h1>
  </si-wizard-step>
  <si-wizard-step
    heading="Step 2"
    [isValid]="stepIsValid"
    (next)="logEvent('Step 2 finished!')"
    (back)="logEvent('Going back to step 1!')"
  >
    <h1 class="text-center">Step 2</h1>
    <div class="text-center">
      <label class="form-check mb-2">
        <input type="checkbox" class="form-check-input" [(ngModel)]="stepIsValid" />
        <span class="form-check-label">Check, if the step 2 is valid.</span>
      </label>
    </div>
  </si-wizard-step>
  <si-wizard-step heading="Step 3" [isValid]="true" (save)="logEvent('Wizard finished!')">
    <h1 class="text-center">Step 3</h1>
  </si-wizard-step>
</si-wizard>
```

### Cancel Button

Add the `hasCancel` attribute and set it to `true`. With the output `cancel` you can define what happen if the user presses the cancel button.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiWizardComponent, SiWizardStepComponent, FormsModule],
  templateUrl: './si-wizard-cancel-button.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  stepIsValid = true;
}
```

Template:

```html
<si-wizard [hasCancel]="true" (wizardCancel)="logEvent('Canceled!')">
  <si-wizard-step heading="Step 1" (next)="logEvent('Step 1 finished!')">
    <h1 class="text-center">Step 1</h1>
  </si-wizard-step>
  <si-wizard-step
    heading="Step 2"
    [isValid]="stepIsValid"
    (next)="logEvent('Step 2 finished!')"
    (back)="logEvent('Going back to step 1!')"
  >
    <h1 class="text-center">Step 2</h1>
    <div class="text-center">
      <label class="form-check mb-2">
        <input type="checkbox" class="form-check-input" [(ngModel)]="stepIsValid" />
        <span class="form-check-label">Check, if the step 2 is valid.</span>
      </label>
    </div>
  </si-wizard-step>
  <si-wizard-step heading="Step 3" [isValid]="false" (save)="logEvent('Step 3 finished!')">
    <h1 class="text-center">Step 3</h1>
  </si-wizard-step>
</si-wizard>
```

### Number representation

The number representation for wizard steps can be enabled by setting the `showStepNumbers` input to `true`.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { SiWizardComponent, SiWizardStepComponent } from '@siemens/element-ng/wizard';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiWizardComponent, SiWizardStepComponent, FormsModule],
  templateUrl: './si-wizard-numbered-steps.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  protected stepIsValid = true;
}
```

Template:

```html
<si-wizard class="h-100" showStepNumbers="true">
  @let steps =
    [
      'Step 1',
      'Step 2',
      'Step 3',
      'Step 4',
      'Step 5',
      'Step 6',
      'Step 7',
      'Step 8',
      'Step 9',
      'Step 10'
    ];
  @for (step of steps; track step) {
    <si-wizard-step [heading]="step" [failed]="step === 'Step 3'" [isValid]="stepIsValid">
      <div class="card d-flex flex-column h-100 p-6">
        <h1 class="text-center">{{ step }}</h1>
        <p>Content with full height</p>
        <label class="form-check mb-2">
          <input type="checkbox" class="form-check-input" [(ngModel)]="stepIsValid" />
          <span class="form-check-label">Check, if the step is valid.</span>
        </label>
      </div>
    </si-wizard-step>
  }
</si-wizard>
```

### [SiWizardComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L71-L526>)

**Kind:** component

**Selector:** `si-wizard`

```
import { SiWizardComponent } from '@siemens/element-ng/wizard';
```

```
component SiWizardComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [backText](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L96-L96>) | `TranslatableString` | `` $localize`:@@SI_WIZARD.BACK:Back` `` | Description of back button. |
| [cancelText](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L145-L145>) | `TranslatableString` | `` $localize`:@@SI_WIZARD.CANCEL:Cancel` `` | Description of cancel button. |
| [completionPageVisibleTime](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L163-L163>) | `number` | `3000` | Define how many milliseconds the completion page is visible. |
| [completionText](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L136-L136>) | `TranslatableString` | `` $localize`:@@SI_WIZARD.COMPLETED:Wizard completed!` `` | Text shown if you complete the wizard. |
| [enableCompletionPage](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L157-L157>) | `boolean` | `false` | Display a predefined page by the end of the wizard. |
| [hasCancel](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L151-L151>) | `boolean` | `false` | Show the cancel button |
| [hideNavigation](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L112-L112>) | `boolean` | `false` | Hide the navigation buttons previous/next. |
| [hideSave](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L127-L127>) | `boolean` | `false` | Hide the save button. |
| [inlineNavigation](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L199-L199>) | `boolean` | `false` | Set false to show navigation buttons in footer instead of inline. |
| [nextText](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L105-L105>) | `TranslatableString` | `` $localize`:@@SI_WIZARD.NEXT:Next` `` | Description of next button. |
| [saveText](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L121-L121>) | `TranslatableString` | `` $localize`:@@SI_WIZARD.SAVE:Save` `` | Description of save button. |
| [showStepNumbers](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L205-L205>) | `boolean` | `false` | Use number representation for steps. |
| [showVerticalDivider](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L211-L211>) | `boolean` | `false` | Set to true to display a divider between the steps and the content in the vertical |
| [stepActiveIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L175-L175>) | `string` | `'elementRadioChecked'` | Class name of icon shown for the active step. |
| [stepCompletedIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L181-L181>) | `string` | `'elementCheckedFilled'` | Class name of icon shown when a step was completed. |
| [stepFailedIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L187-L187>) | `string` | `'elementWarningFilled'` | Class name of icon shown when a step had an error. |
| [stepIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L169-L169>) | `string` | `'elementNotChecked'` | Class name of icon shown for current and upcoming steps. |
| [verticalLayout](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L193-L193>) | `boolean` | `false` | Set the orientation of the wizard to vertical. |
| [verticalMaxSize](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L215-L215>) | `string \| undefined` |  | Set the wizard step container max size in vertical layout. |
| [verticalMinSize](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L213-L213>) | `string \| undefined` |  | Set the wizard step container min size in vertical layout. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [completionAction](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L218-L218>) | `void` | Callback function triggered after the wizard has been completed. |
| [wizardCancel](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L221-L221>) | `void` | Callback function triggered if the wizard has been canceled. |

#### Attributes and Methods

##### back

[Source for back](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L381-L387>)

Go to the previous wizard step.

```
back(delta?: number = 1): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [delta](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L381-L381>) (optional) | `number` | `1` | • optional number of steps to move backwards. |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

##### currentStep

[Source for currentStep](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L234-L236>)

**Modifiers:** readonly

**Type:** `SiWizardStepComponent | undefined`

Get current visible wizard step.

##### index

[Source for index](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L224-L226>)

**Modifiers:** readonly

**Type:** `number`

Get the current step wizard step index.

##### next

[Source for next](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L356-L367>)

Go to the next wizard step.

```
next(delta?: number = 1): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [delta](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L356-L356>) (optional) | `number` | `1` | • optional number of steps to move forward. |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

##### save

[Source for save](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L390-L402>)

Triggers the save action to complete the wizard.

```
save(): void
```

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

##### stepCount

[Source for stepCount](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard.component.ts#L229-L231>)

**Modifiers:** readonly

**Type:** `number`

Get number of wizard steps.

### [SiWizardStepComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L20-L60>)

**Kind:** component

**Selector:** `si-wizard-step`

```
import { SiWizardStepComponent } from '@siemens/element-ng/wizard';
```

```
component SiWizardStepComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [failed](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L46-L46>) | `boolean` | `false` | Whether the step is shown as failed in the wizard navigation. |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L28-L28>) | `TranslatableString` | `''` | Heading displayed for the wizard step. |
| [isNextNavigable](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L40-L40>) | `boolean` | `true` | Whether the wizard navigates to the next step after emitting `next`. |
| [isValid](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L34-L34>) | `boolean` | `true` | Whether the step is valid and allows navigation to subsequent steps. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [back](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L51-L51>) | `void` | Emits when the user navigates back from this step. |
| [next](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L49-L49>) | `void` | Emits when the user navigates forward from this step. |
| [save](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L53-L53>) | `void` | Emits when the user completes the wizard from this step. |

#### Attributes and Methods

##### isActive

[Source for isActive](<https://github.com/siemens/element/blob/main/projects/element-ng/wizard/si-wizard-step.component.ts#L59-L59>)

**Modifiers:** readonly

**Type:** `WritableSignal<boolean>`

**Default:** `false`

Whether this step is currently active or not.

### Types Documentation

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```
