# SiLoginBasicComponent documentation

**Kind:** component

**Selector:** `si-login-basic`

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

A basic login component that supports both single-step and two-step authentication flows.

This component provides a standard login form with username and password fields. It can be configured to work in two-step mode where username validation happens first, followed by password entry.

Example:

```html
<si-login-basic
  [forgotPasswordLink]="forgotPasswordLink"
  [registerNowLink]="registerNowLink"
  [twoStep]="true"
  [loading]="isLoading"
  (login)="handleLogin($event)"
  (usernameValidation)="handleUsernameValidation($event)">
</si-login-basic>
```

```
component SiLoginBasicComponent implements OnInit
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [backButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L125-L125>) | `TranslatableString` | `` $localize`:@@SI_LOGIN_BASIC.BACK:Back` `` | Description of back button. |
| [disableLogin](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L103-L103>) | `boolean` | `false` | Disables the login button. |
| [forgotPasswordLink](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L83-L83>) | `Link \| undefined` |  | Config for Forgot Password link. If `title` is omitted, a default translated label is used. |
| [loading](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L116-L116>) | `boolean` | `false` | Indicates whether the login button should show a loading state. |
| [loginButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L97-L97>) | `TranslatableString` | `` $localize`:@@SI_LOGIN_BASIC.LOGIN:Log in` `` | Label for login button. |
| [nextButtonLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L134-L134>) | `TranslatableString` | `` $localize`:@@SI_LOGIN_BASIC.NEXT:Next` `` | Description of next button. |
| [passwordLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L78-L78>) | `TranslatableString` | `` $localize`:@@SI_LOGIN_BASIC.PASSWORD:Password` `` | Label for password input field. |
| [registerNowLink](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L88-L88>) | `Link \| undefined` |  | Config for Register Now link. If `title` is omitted, a default translated label is used. |
| [twoStep](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L109-L109>) | `boolean` | `false` | Enables the two-step login flow. |
| [usernameLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L69-L69>) | `TranslatableString` | `` $localize`:@@SI_LOGIN_BASIC.USERNAME:Username` `` | Label for username input field. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [login](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L146-L146>) | `UsernamePassword` | Emits username and password on login event. |
| [usernameValidation](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L138-L138>) | `UsernameValidationPayload` | Emits username when user clicks on next button. |
| [valueChanged](<https://github.com/siemens/element/blob/main/projects/element-ng/landing-page/login-basic/si-login-basic.component.ts#L142-L142>) | `UsernamePassword` | Emits username and password on value change. |

### Types Documentation

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

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

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

**Kind:** interface

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

```
interface UsernamePassword
```

#### Properties

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

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

**Kind:** type alias

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

```
type UsernameValidationPayload = Pick<UsernamePassword, 'username'> & {
  validate: (isValid: boolean) => void;
}
```
