# SiChangePasswordComponent documentation

**Kind:** component

**Selector:** `si-change-password`

```
import { SiChangePasswordComponent } from '@siemens/element-ng/landing-page';
```

A component for changing user passwords with strength validation and policy enforcement.

This component provides a form for users to change their password, including password strength indicators, policy validation, and confirmation fields. It supports custom password policies and displays inline notifications for alerts.

Example:

```html
<si-change-password
  [passwordStrength]="passwordPolicy"
  [passwordPolicyContent]="policyTemplate"
  [changePasswordAlert]="alertConfig"
  (changePasswordRequested)="handlePasswordChange($event)"
  (back)="handleBack()">
</si-change-password>
```

```
component SiChangePasswordComponent implements OnInit, OnDestroy
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [backButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L128-L128>) | `TranslatableString` | `` $localize`:@@SI_CHANGE_PASSWORD.BACK:Back` `` | Description of back button. |
| [changeButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L119-L119>) | `TranslatableString` | `` $localize`:@@SI_CHANGE_PASSWORD.CHANGE:Change` `` | Label for change password button. |
| [changePasswordAlert](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L157-L157>) | `AlertConfig \| undefined` |  | Config to enable/disable password related error/alerts. |
| [confirmPasswordLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L108-L110>) | `TranslatableString` | `` $localize`:@@SI_CHANGE_PASSWORD.CONFIRM_PASSWORD:Confirm password` `` | Label for confirm password input field. |
| [disableChange](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L134-L134>) | `boolean` | `false` | Disables the change password button. |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L72-L74>) | `TranslatableString` | `` $localize`:@@SI_CHANGE_PASSWORD.CHANGE_PASSWORD:Change password` `` | Change password heading. |
| [newPasswordLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L97-L99>) | `TranslatableString` | `` $localize`:@@SI_CHANGE_PASSWORD.NEW_PASSWORD:New password` `` | Label for new password input field. |
| [passwordPolicyContent](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L149-L149>) (required) | `string \| TemplateRef<unknown>` |  | Description of the password policy requirements. |
| [passwordPolicyTitle](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L143-L145>) | `TranslatableString` | `` $localize`:@@SI_CHANGE_PASSWORD.PASSWORD_POLICY:Password policy` `` | Title of the password policy. |
| [passwordStrength](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L153-L153>) (required) | `PasswordPolicy` |  | Description of the password policy requirements. |
| [subheading](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L83-L88>) | `TranslatableString` | `` $localize`:@@SI_CHANGE_PASSWORD.CHANGE_FACTORY_PASSWORD:Default password must be changed` `` | Short description of the action to perform. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [back](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L174-L174>) | `void` | Emits on back click. |
| [changePasswordRequested](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L165-L165>) | `ChangePassword` | Emits password on change event. |
| [passwordStrengthChanged](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L170-L170>) | `number \| void` | The number indicating the number of rules which still can be met. (`-2` --\> 2 rules are still unmet, `0` --\> all met) |
| [valueChanged](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/change-password/si-change-password.component.ts#L161-L161>) | `ChangePassword` | Emits password on value change. |

### Types Documentation

### [AlertConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/alert-config.model.ts#L8-L14>)

**Kind:** interface

```
import type { AlertConfig } from '@siemens/element-ng/landing-page';
```

```
interface AlertConfig
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/alert-config.model.ts#L12-L12>) (optional) | `Link` |  |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/alert-config.model.ts#L10-L10>) (optional) | `string` |  |
| [message](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/alert-config.model.ts#L11-L11>) | `string` |  |
| [severity](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/alert-config.model.ts#L9-L9>) | `StatusType` |  |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/alert-config.model.ts#L13-L13>) (optional) | `{ [key: string]: any; }` |  |

### [PasswordPolicy](<https://github.com/siemens/element/blob/main/projects/element-ng/password-strength/si-password-strength.directive.ts#L14-L46>)

**Kind:** interface

```
import type { PasswordPolicy } from '@siemens/element-ng/password-strength';
```

```
interface PasswordPolicy
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [allowWhitespace](<https://github.com/siemens/element/blob/main/projects/element-ng/password-strength/si-password-strength.directive.ts#L38-L38>) (optional) | `boolean` | Whether to allow whitespaces. By default whitespaces are not allowed. |
| [digits](<https://github.com/siemens/element/blob/main/projects/element-ng/password-strength/si-password-strength.directive.ts#L30-L30>) | `boolean` | Define if digits are required in password. |
| [lowercase](<https://github.com/siemens/element/blob/main/projects/element-ng/password-strength/si-password-strength.directive.ts#L26-L26>) | `boolean` | Define if lowercase characters are required in password. |
| [minLength](<https://github.com/siemens/element/blob/main/projects/element-ng/password-strength/si-password-strength.directive.ts#L18-L18>) | `number` | Define minimal number of characters. |
| [minRequiredPolicies](<https://github.com/siemens/element/blob/main/projects/element-ng/password-strength/si-password-strength.directive.ts#L45-L45>) (optional) | `number` | Minimum required policies for valid password. When set to a number greater than 0, defines the number of policies that must be met for the password to be valid. E.g. when set to 3 and the policies uppercase/lowercase/digits/special are all set and the password contains 3 out of these four, the password will be valid. |
| [special](<https://github.com/siemens/element/blob/main/projects/element-ng/password-strength/si-password-strength.directive.ts#L34-L34>) | `boolean` | Define if special characters are required in password. |
| [uppercase](<https://github.com/siemens/element/blob/main/projects/element-ng/password-strength/si-password-strength.directive.ts#L22-L22>) | `boolean` | Define if uppercase characters are required in password. |

### [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
```

### [ChangePassword](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/si-landing-page.model.ts#L17-L20>)

**Kind:** interface

```
import type { ChangePassword } from '@siemens/element-ng/landing-page';
```

```
interface ChangePassword
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [confirmPassword](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/si-landing-page.model.ts#L19-L19>) | `string \| null \| undefined` |  |
| [newPassword](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/si-landing-page.model.ts#L18-L18>) | `string \| null \| undefined` |  |

### [StatusType](<https://github.com/siemens/element/blob/main/projects/element-ng/common/models/status-type.model.ts#L7-L7>)

**Kind:** type alias

```
import type { StatusType } from '@siemens/element-ng/common';
```

```
type StatusType = 'success' | 'info' | 'warning' | 'danger' | 'caution' | 'critical'
```

### [Link](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L8-L51>)

**Kind:** interface

```
import type { Link } from '@siemens/element-ng/link';
```

```
interface Link
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L42-L42>) (optional) | `string \| ((param?: any) => void \| any)` | A function that will be invoked when clicking on the menu item. When passed as a string, use together with SiLinkActionService to receive events. This is meant for repetitive things in lists/tables/etc. |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L50-L50>) (optional) | `boolean` | A boolean that lets the link know whether it is disabled or not. |
| [href](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L22-L22>) (optional) | `string` | Defines a href URI that the menu item will be linked to. Will be used to set the href attribute of the a element. Will only be used if link and function is not set. |
| [isActive](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L46-L46>) (optional) | `boolean` | A boolean that lets the link know whether it is active or not. It is useful when action() is executed instead of link route. |
| [link](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L32-L32>) (optional) | `string \| any[]` | Defines the link of the menu item within the application using the angular router link concept. Accepts an array of `any` as per \[routerLink API definition\][https://angular.dev/api/router/RouterLink](<https://angular.dev/api/router/RouterLink>). |
| [navigationExtras](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L36-L36>) (optional) | `NavigationExtras` | The navigation extras provide additional routing options when using the router link. |
| [target](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L27-L27>) (optional) | `string` | The target attribute specifies where to open the linked document. If no target is specified, the link will open in the current tab. |
| [title](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L12-L12>) (optional) | `TranslatableString` | The title of the menu item. Can be either the title to be displayed or the translation key. |
| [tooltip](<https://github.com/siemens/element/blob/main/projects/element-ng/link/link.model.ts#L17-L17>) (optional) | `TranslatableString` | The optional tooltip of the link. Can be either the text to be displayed or the translation key. |
