# Application header

The **Application header** organizes an application's structure and content, making it easy to find information and achieve tasks. It communicates relationships, context, and actions a user can take within an application.

## Usage

![Application header](<../images/application-header.png>)

There are variations of the application header: Standard version and [with launchpad](<https://element.siemens.io/components/layout-navigation/launchpad/>) support.

### When to use

- To provide a consistent, application-wide shell that anchors branding, identity, and global context across all pages.
- To expose the application's primary navigation, with up to four top-level navigation items.
- To give users quick access to global actions and information such as settings, notifications, help, and the user profile.
- To let users switch between different application contexts via the launchpad.

## Design

### Elements

The application header consists of the following elements:

![Application header](<../images/application-header-usage-construction.png>)

> (1) Brand-logo, (2) Application name, (3) Primary navigation items (up to four), (4) Tool bar, (5) Launchpad selector

> [!NOTE]
>
> **Launchpad**
>
> The application header supports a launchpad that can be opened via (5) launchpad selector. It allows a user to switch between different application contexts. See the [launchpad documentation](<https://element.siemens.io/components/layout-navigation/launchpad/>) for more information.

### Toolbar

The toolbar contains all the additional navigation and indication elements, which gives the user access to general information like: settings, user profile, about pages, help etc.

![Application header](<../images/application-header-usage-toolbar-menu.png>)

#### Help menu

The help menu is **mandatory** for all applications, because it has legal relevant aspects. The help menu is located left of the user avatar and uses `element-help` as icon.

The user menu is based on the [menu container](<https://element.siemens.io/components/buttons-menus/menu/>).

![Menu - help](<../images/application-header-usage-menu-help.png>)

1. Help (optional)
2. Additional information for providing help to the user *(optional)*
3. Link to the *About* page *(mandatory)*
4. Link to the *Corporate Information* page *(mandatory)*

**Note:**

- The help menu should provide a fast overview about related content.
- Other legal links should be part of the about page.

#### User menu (optional)

The user menu is mandatory for all applications, which are providing content to a signed in user. This menu is not needed for pages without user management.

The user menu is based on the [menu container](<https://element.siemens.io/components/buttons-menus/menu/>).

![Menu - users](<../images/application-header-usage-menu-users.png>)

1. User name (readable)
2. Technical username (typically the email address)
3. Company *(deprecated)*
4. Role
5. Company Switcher *(deprecated)*
6. Profile / user-specific settings
7. Sign out

### Responsive behavior

![Application header](<../images/application-header-usage-responsive-behavior.png>)

(A) The application header spans over the whole screen width.

On smaller screens it behaves according to the following rule set:

- (B) Decrease of whitespace between Brand-area, Primary navigation items and tool-bar to a defined minimum, no abbreviations of labels.
- (C) Brand logo will be skipped, further decrease whitespace to a minimum.
- (D) Switch to mobile view, here the active tab name will be displayed or if not present, then the application name.

## Code

Element provides a template driven approach to create an application header. This enables applications to customize the header according to their needs.

The header has three main sections which can be placed inside the `si-application-header`.

```
<si-application-header>
  <si-header-brand></si-header-brand>
  <si-header-navigation></si-header-navigation>
  <si-header-actions></si-header-actions>
</si-application-header>
```

> [!NOTE]
>
> **Launchpad**
>
> The application header also supports a launchpad. See the [launchpad documentation](<https://element.siemens.io/components/layout-navigation/launchpad/>) for more information.

### Header brand

The brand section contains brand related content, most likely the logo and the application name.

```
<si-application-header>
  <si-header-brand>
    <a siHeaderLogo routerLink="/" class="d-none d-md-flex"></a>
    <h1 class="application-name">My application</h1>
  </si-header-brand>
  ...
</si-application-header>
```

Instead of the Siemens logo, you can also use a custom logo like the Siemens healthineers logo.

```
<si-application-header>
  <si-header-brand>
    <a routerLink="/" class="navbar-brand px-6 focus-inside">
      <img src="./assets/images/siemens-healthineers-logo.svg" alt="Siemens healthineers" />
    </a>
    ...
  </si-header-brand>
  ...
</si-application-header>
```

### Header navigation

The navigation section contains the primary navigation items.

```
<si-application-header>
  ...
  <si-header-navigation>
    <a si-header-navigation-item routerLink="/m1" routerLinkActive="active">Module 1</a>
    <a si-header-navigation-item routerLink="/m2" routerLinkActive="active">Module 2</a>
  </si-header-navigation>
  ...
</si-application-header>
```

Header navigation items can have header-dropdowns containing subitems.

```
<si-application-header>
  ...
  <si-header-navigation>
    <button
      si-header-navigation-item
      [siHeaderDropdownTriggerFor]="dropdown"
      routerLinkActive="active"
    >
      Module 1
      <ng-template #dropdown>
        <si-header-dropdown>
          <a si-header-dropdown-item routerLink="/m1/1" routerLinkActive="active">Module 1.1</a>
          <a si-header-dropdown-item routerLink="/m1/2" routerLinkActive="active">Module 1.2</a>
        </si-header-dropdown>
      </ng-template>
    </button>
  </si-header-navigation>
  ...
</si-application-header>
```

It is important that the dropdown is placed inside the `si-header-navigation-item`. This is required by the `routerLinkActive` directive as it only detects content or view children.

### Header actions

The actions section contains additional actions like the user menu and the help menu. Actions are typically buttons that open a header-dropdown.

```
<si-application-header>
  ...
  <si-header-actions>
    <button si-header-action-item icon="element-help" [siHeaderDropdownTriggerFor]="help">
      Help
    </button>
  </si-header-actions>
</si-application-header>

<ng-template #help>
  <si-header-dropdown>
    <a si-header-dropdown-item routerLink="/about">About</a>
    <a si-header-dropdown-item routerLink="/corporate-information">Corporate Information</a>
  </si-header-dropdown>
</ng-template>
```

Header action menus should be placed outside the `si-application-header` to keep the actual header definition clean.

#### Account menu

The application header provides a special action item for the user account menu showing the initials or the profile picture. The code below demonstrates how to use custom content next to standard dropdown items. Adopt this in your application to create an account menu similar to the one in the deprecated `si-primary-navbar`.

```
<si-application-header>
  ...
  <si-header-actions>
    <button
      si-header-account-item
      type="button"
      name="Lars Vegas"
      [siHeaderDropdownTriggerFor]="account"
    >
    </button>
  </si-header-actions>

  <ng-template #account>
    <si-header-dropdown>
      <si-account-details
        name="Lars Vegas"
        email="lars.vegas@siemens.com"
        company="Siemens AG"
        userRole="Admin"
      />
      <div class="dropdown-divider"></div>
      <button
        si-header-dropdown-item
        icon="element-language"
        type="button"
        [siHeaderDropdownTriggerFor]="..."
      >
        Language
      </button>
      ...
    </si-header-dropdown>
  </ng-template>
</si-application-header>
```

#### Selection menu (Tenant switch)

The application header provides another special item for selecting a global state, like a tenant. Only use this once per application.

```
<si-application-header>
  ...
  <si-header-actions>
    <button si-header-selection-item type="button" [siHeaderDropdownTriggerFor]="...">
      {{currentTenant}}
    </button>
  </si-header-actions>
</si-application-header>
```

The application is responsible for managing the state and the selection dialog. For simple use cases, an application can use the `si-header-dropdown` component to show available options.

If a more complex selection dialog is required, an application can use the `(click)` event to show a custom dialog. The open state of the `si-selection-item` can be controlled by the `[open]` input. Use this input only, if you are not using the `siHeaderDropdownTriggerFor` directive.

### Custom content

`si-header-brand`, `si-header-navigation`, `si-header-actions` and `si-header-dropdown` can contain custom content. Use this to add extra content like user details or a tenant switch.

When adding custom content, ensure that the necessary styling is applied. Add the `header-item` class to get the basic styling for header items. If the item is interactive (like a button), add the `focus-inside` class to prevent the overflow of the focus ring. If the item has a dropdown attached, include the dropdown caret.

A very basic custom item could look like this:

```
<button class="header-item focus-inside" [siHeaderDropdownTriggerFor]="dropdown">
  Custom content
  <span class="element-down-2 dropdown-caret"></span>
</button>
```

### Layout and responsive behavior

The header is designed to be responsive and to adapt to different screen sizes. It supports two modes: `expanded` and `collapsed` (`mobile`). The header switches the mode automatically based on screen size. By default, it will switch to `collapsed` on the `sm` breakpoint (576px). Use the `expandBreakpoint` input to change the breakpoint.

In the expanded mode, the header will split the available space evenly between the brand, navigation, and actions sections. If not enough space is available, the header will resize the different parts. It will not automatically switch to the collapsed, so developers must ensure that the content fits the available space.

In the `collapsed` mode the header will only show the brand and action section. The navigation section is collapsed into a hamburger menu.

To customize the visible actions in the collapsed mode, use the `si-header-collapsible-actions` component. It will collapse its actions into a menu.

```
<si-application-header>
  ...
  <si-header-actions>
    ...
    <si-header-collapsible-actions>
      <button si-header-action-item icon="element-help">Help</button>
    </si-header-collapsible-actions>
    ...
  </si-header-actions>
</si-application-header>
```

There should only be one `si-header-collapsible-actions` component per header.

To customize other content within the header like the logo, use utility classes. If an item should only be visible for screens larger or equal `md`, apply `d-none` to hide it and `d-md-flex` to show it on `md` and larger.

```
<si-application-header>
  <si-header-brand>
    <a siHeaderLogo routerLink="/" class="d-none d-md-flex"></a>
    ...
  </si-header-brand>
  ...
</si-application-header>
```

You can use those classes as well to change the order of items in the collapsed mode. Do this by duplicating the item and hiding it either in expanded or collapsed.

In the following example, the FAQ button should be shown before the `Help` button in expanded mode. But in the collapsed mode, it should be shown inside the collapsible actions. Therefor, the FAQ button is duplicated and each version has the required bootstrap utilities applied.

```
<si-application-header>
  ...
  <si-header-actions>
    <!-- FAQ button to be shown in expanded mode. -->
    <!-- "d-none" is hiding it generally, "d-sm-flex" is overriding this to show the button on screens larger or equal "sm" -->
    <button si-header-action-item icon="element-faq" class="d-none d-sm-flex">FAQ</button>
    <button si-header-action-item icon="element-help">Help</button>
    <si-header-collapsible-actions>
      <!-- FAQ button to be shown in collapsed mode. -->
      <!-- "d-sm-none" is hiding it on screens larger or equal "sm" -->
      <button si-header-action-item icon="element-faq" class="d-sm-none">FAQ</button>
      <button si-header-action-item icon="element-notification">Notifications</button>
    </si-header-collapsible-actions>
    ...
  </si-header-actions>
</si-application-header>
```

You can also use any other `d-<breakpoint>-<mode>` class. For changing the order, use same breakpoint as for switching the header mode (default: `sm`). To show elements always use `d-<breakpoint>-flex`.

### Header dropdowns

As shown in previous examples, the header dropdown is an optional component to add a dropdown menu to header items. While being visually similar to the `si-menu`, header dropdowns are quite different. Unlike the `si-menu`, header dropdowns feature a tab-based keyboard interaction which provides a better user experience for keyboard users in headers / navbars. The header dropdown seamlessly integrates into the header by managing focus automatically and adopting to the header's current responsive mode.

A header menu is opened by a `siHeaderDropdownTriggerFor` directive which should be applied to an interactive element. The dropdown content should be placed inside a `si-header-dropdown` element within a `ng-template`. It is possible to nest dropdown items and to add custom content like dividers.

```
<button class="btn btn-primary" [siHeaderDropdownTriggerFor]="dropdown2">Toggle dropdown</button>

<ng-template #dropdown1>
  <si-header-dropdown>
    <button si-header-dropdown-item>Item 1</button>
    <button si-header-dropdown-item [siHeaderDropdownTriggerFor]="dropdown2">Item 2</button>
    <span class="dropdown-divider"></span>
    <button si-header-dropdown-item>Item 3</button>
  </si-header-dropdown>
</ng-template>

<ng-template #dropdown2>
  <button si-header-dropdown-item>Item 2.1</button>
  <button si-header-dropdown-item>Item 2.2</button>
</ng-template>
```

Header dropdowns should only be used in headers. In other areas, use the [SiMenu](<https://element.siemens.io/components/buttons-menus/menu/>) instead.

### Example

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component } from '@angular/core';
import { RouterLink, RouterLinkActive } from '@angular/router';
import {
  SiAccountDetailsComponent,
  SiApplicationHeaderComponent,
  SiHeaderAccountItemComponent,
  SiHeaderActionItemComponent,
  SiHeaderActionsDirective,
  SiHeaderBrandDirective,
  SiHeaderCollapsibleActionsComponent,
  SiHeaderLogoDirective,
  SiHeaderNavigationComponent,
  SiHeaderNavigationItemComponent,
  SiHeaderSelectionItemComponent
} from '@siemens/element-ng/application-header';
import {
  SiHeaderDropdownComponent,
  SiHeaderDropdownItemComponent,
  SiHeaderDropdownTriggerDirective
} from '@siemens/element-ng/header-dropdown';

@Component({
  selector: 'app-sample',
  imports: [
    SiApplicationHeaderComponent,
    SiHeaderActionItemComponent,
    SiHeaderCollapsibleActionsComponent,
    RouterLink,
    RouterLinkActive,
    SiAccountDetailsComponent,
    SiHeaderDropdownComponent,
    SiHeaderDropdownTriggerDirective,
    SiHeaderDropdownItemComponent,
    SiHeaderNavigationItemComponent,
    SiHeaderAccountItemComponent,
    SiHeaderNavigationComponent,
    SiHeaderActionsDirective,
    SiHeaderBrandDirective,
    SiHeaderSelectionItemComponent,
    SiHeaderLogoDirective
  ],
  templateUrl: './si-application-header.html'
})
export class SampleComponent {
  allTenants = ['Tenant 1', 'Tenant 2', 'Tenant 3'];

  activeTenant = 'Tenant 1';
}
```

Template:

```html
<si-application-header>
  <si-header-brand>
    <a siHeaderLogo routerLink="/" class="d-none d-md-flex"></a>
    <h1 class="application-name">My application</h1>
  </si-header-brand>

  <si-header-navigation aria-label="Main navigation">
    <a si-header-navigation-item routerLink="m1" routerLinkActive="active">Module 1</a>
    <button
      type="button"
      si-header-navigation-item
      routerLinkActive="active"
      [siHeaderDropdownTriggerFor]="module2"
    >
      Module 2
      <!-- template must be here to have routerLinkActive working -->
      <ng-template #module2>
        <si-header-dropdown>
          <a si-header-dropdown-item routerLink="m2/1">M2.1</a>
          <a si-header-dropdown-item routerLink="m2/2">M2.2</a>
        </si-header-dropdown>
      </ng-template>
    </button>
  </si-header-navigation>

  <si-header-actions>
    <button
      class="d-none d-sm-flex"
      type="button"
      si-header-selection-item
      [siHeaderDropdownTriggerFor]="tenants"
      >{{ activeTenant }}</button
    >
    <button
      type="button"
      icon="element-language"
      si-header-action-item
      [siHeaderDropdownTriggerFor]="notifications"
    >
      Notifications
    </button>

    <si-header-collapsible-actions>
      <button
        class="d-sm-none"
        type="button"
        si-header-selection-item
        [siHeaderDropdownTriggerFor]="tenants"
        >{{ activeTenant }}</button
      >
      <button
        si-header-action-item
        type="button"
        icon="element-help"
        [badge]="400"
        [siHeaderDropdownTriggerFor]="support"
        >Support</button
      >
      <button si-header-action-item type="button" icon="element-settings" [badge]="true"
        >Settings</button
      >
    </si-header-collapsible-actions>

    <button
      si-header-account-item
      type="button"
      name="Lars Vegas"
      [siHeaderDropdownTriggerFor]="account"
    >
    </button>
  </si-header-actions>
</si-application-header>

<ng-template #tenants>
  <si-header-dropdown>
    @for (tenant of allTenants; track tenant) {
      <button
        si-header-dropdown-item
        type="button"
        [checked]="tenant === activeTenant ? 'check' : undefined"
        (click)="activeTenant = tenant"
      >
        {{ tenant }}
      </button>
    }
  </si-header-dropdown>
</ng-template>

<ng-template #notifications>
  <si-header-dropdown>
    <button si-header-dropdown-item type="button">Message 1</button>
    <button si-header-dropdown-item type="button">Message 2</button>
  </si-header-dropdown>
</ng-template>

<ng-template #account>
  <si-header-dropdown>
    <si-account-details
      name="Lars Vegas"
      email="lars.vegas@siemens.com"
      company="Siemens AG"
      userRole="Admin"
    />
    <div class="dropdown-divider"></div>
    <button
      si-header-dropdown-item
      icon="element-language"
      type="button"
      [siHeaderDropdownTriggerFor]="language"
    >
      Language
    </button>
    <button si-header-dropdown-item icon="element-palette" type="button">Design</button>
    <button si-header-dropdown-item icon="element-user" type="button">Profile</button>
  </si-header-dropdown>
</ng-template>

<ng-template #language>
  <si-header-dropdown>
    <div class="dropdown-header">Selection has no effect!</div>
    <button si-header-dropdown-item type="button">German</button>
    <button si-header-dropdown-item type="button" [siHeaderDropdownTriggerFor]="englishVariants">
      English
    </button>
  </si-header-dropdown>
</ng-template>

<ng-template #englishVariants>
  <si-header-dropdown>
    <button si-header-dropdown-item type="button">English (US)</button>
    <button si-header-dropdown-item type="button">English (UK)</button>
  </si-header-dropdown>
</ng-template>

<ng-template #support>
  <si-header-dropdown>
    <button si-header-dropdown-item type="button">Help</button>
    <button si-header-dropdown-item type="button">Contact</button>
  </si-header-dropdown>
</ng-template>
```

### [SiApplicationHeaderComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-application-header.component.ts#L42-L205>)

**Kind:** component

**Selector:** `si-application-header`

```
import { SiApplicationHeaderComponent } from '@siemens/element-ng/application-header';
```

Root component for the application header.

```
component SiApplicationHeaderComponent implements HeaderWithDropdowns, OnDestroy
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [expandBreakpoint](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-application-header.component.ts#L50-L50>) | `"sm" \| "md" \| "lg" \| "xl" \| "xxl" \| "never"` | `'sm'` | Defines the minimum breakpoint which must be matched to expand the header / switch to desktop mode. |
| [launchpad](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-application-header.component.ts#L52-L52>) | `TemplateRef<void> \| undefined` |  | Template reference for the launchpad content rendered inside the header. |
| [launchpadLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-application-header.component.ts#L61-L61>) | `TranslatableString` | `` $localize`:@@SI_APPLICATION_HEADER.LAUNCHPAD:Launchpad` `` | Accessible label for the launchpad toggle button. |

### [SiHeaderBrandDirective](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-brand.directive.ts#L12-L12>)

**Kind:** directive

**Selector:** `si-header-brand`

```
import { SiHeaderBrandDirective } from '@siemens/element-ng/application-header';
```

```
directive SiHeaderBrandDirective
```

### [SiHeaderNavigationComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-navigation.component.ts#L18-L29>)

**Kind:** component

**Selector:** `si-header-navigation`

```
import { SiHeaderNavigationComponent } from '@siemens/element-ng/application-header';
```

```
component SiHeaderNavigationComponent implements OnDestroy
```

### [SiHeaderNavigationItemComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-navigation-item.component.ts#L34-L41>)

**Kind:** component

**Selector:** `button[si-header-navigation-item], a[si-header-navigation-item]`

```
import { SiHeaderNavigationItemComponent } from '@siemens/element-ng/application-header';
```

Adds a navigation item to the header. Should be located inside `.header-navigation`.

```
component SiHeaderNavigationItemComponent
```

### [SiHeaderActionsDirective](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-actions.directive.ts#L12-L12>)

**Kind:** directive

**Selector:** `si-header-actions`

```
import { SiHeaderActionsDirective } from '@siemens/element-ng/application-header';
```

```
directive SiHeaderActionsDirective
```

### [SiHeaderActionItemComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-action-item.component.ts#L23-L28>)

**Kind:** component

**Selector:** `button[si-header-action-item], a[si-header-action-item]`

```
import { SiHeaderActionItemComponent } from '@siemens/element-ng/application-header';
```

Adds an action item to the header. Should be located inside `.header-actions`.

```
component SiHeaderActionItemComponent extends SiHeaderActionIconItemBase
```

#### Input Properties

| Name | Type | Description |
| --- | --- | --- |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-action-item-icon-base.directive.ts#L34-L34>) (inherited) | `number \| boolean \| null \| undefined` | Adds a badge to the header item. If type<br><br>• =number, the number will be shown and automatically trimmed if \>99<br><br>• =true, an empty red dot will be shown<br><br>Inherited from `SiHeaderActionIconItemBase` |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-action-item.component.ts#L25-L25>) (required) | `string` | The icon to be shown. |

### [SiHeaderAccountItemComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-account-item.component.ts#L26-L45>)

**Kind:** component

**Selector:** `button[si-header-account-item]`

```
import { SiHeaderAccountItemComponent } from '@siemens/element-ng/application-header';
```

Adds an account item to the header. Should be located inside `.header-actions`.

```
component SiHeaderAccountItemComponent extends SiHeaderActionIconItemBase
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [accountItemLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-account-item.component.ts#L42-L44>) | `TranslatableString` | `` $localize`:@@SI_APPLICATION_HEADER.ACCOUNT:Account of {{name}}` `` | Accessible label for the account item. |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-action-item-icon-base.directive.ts#L34-L34>) (inherited) | `number \| boolean \| null \| undefined` |  | Adds a badge to the header item. If type<br><br>• =number, the number will be shown and automatically trimmed if \>99<br><br>• =true, an empty red dot will be shown<br><br>Inherited from `SiHeaderActionIconItemBase` |
| [imageUrl](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-account-item.component.ts#L33-L33>) | `string \| undefined` |  | URL to an image which should be shown instead of the initials. |
| [initials](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-account-item.component.ts#L31-L31>) | `string \| undefined` |  | Initials of the account. If not provided, they will be calculated. |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-account-item.component.ts#L29-L29>) (required) | `string` |  | Name of the account. |

### [SiHeaderCollapsibleActionsComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-collapsible-actions.component.ts#L25-L86>)

**Kind:** component

**Selector:** `si-header-collapsible-actions`

```
import { SiHeaderCollapsibleActionsComponent } from '@siemens/element-ng/application-header';
```

Container for actions that should be collapsed in mobile mode.

```
component SiHeaderCollapsibleActionsComponent implements OnDestroy
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [mobileToggleLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/si-header-collapsible-actions.component.ts#L36-L38>) | `TranslatableString` | `` $localize`:@@SI_APPLICATION_HEADER.TOGGLE_ACTIONS:Show actions` `` | Accessible label of the toggle button if actions are collapsed. |

### [SiHeaderDropdownTriggerDirective](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-trigger.directive.ts#L60-L280>)

**Kind:** directive

**Selector:** `[siHeaderDropdownTriggerFor]`

**Exported as:** `siHeaderDropdownTrigger`

```
import { SiHeaderDropdownTriggerDirective } from '@siemens/element-ng/header-dropdown';
```

Trigger to open dropdowns in a navbar. A dropdown will always be attached to the view, even if not visible.

If a dropdown is opened in desktop mode, it will be reattached to an overlay while being opened.

```
directive SiHeaderDropdownTriggerDirective implements OnChanges, OnInit, OnDestroy
```

#### Input Properties

| Name | Type | Description |
| --- | --- | --- |
| [dropdownData](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-trigger.directive.ts#L66-L66>) | `unknown` | Context data passed to the dropdown template. |
| [siHeaderDropdownTriggerFor](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-trigger.directive.ts#L64-L64>) (required) | `TemplateRef<unknown>` | Template rendered inside the dropdown. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [openChange](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-trigger.directive.ts#L68-L68>) | `boolean` | Emits whenever a dropdown is opened or closed. |

#### Attributes and Methods

##### close

[Source for close](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-trigger.directive.ts#L174-L213>)

Closes the dropdown.

```
close(options?: { all?: boolean; }): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [options](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-trigger.directive.ts#L174-L174>) (optional) | `{ all?: boolean; }` |  |  |

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

##### isOpen

[Source for isOpen](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-trigger.directive.ts#L126-L128>)

**Modifiers:** readonly

**Type:** `boolean`

Whether the dropdown is currently open.

##### open

[Source for open](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-trigger.directive.ts#L153-L171>)

Opens the dropdown.

```
open(): void
```

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

### [SiHeaderDropdownComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown.component.ts#L31-L67>)

**Kind:** component

**Selector:** `si-header-dropdown`

```
import { SiHeaderDropdownComponent } from '@siemens/element-ng/header-dropdown';
```

Wrapper component for [SiHeaderDropdownItemComponent](<index.html#SiHeaderDropdownItemComponent>). Must only be opened using an [SiHeaderDropdownTriggerDirective](<index.html#SiHeaderDropdownTriggerDirective>).

```
component SiHeaderDropdownComponent
```

### [SiHeaderDropdownItemComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-item.component.ts#L26-L55>)

**Kind:** component

**Selector:** `si-header-dropdown-item, a[si-header-dropdown-item], button[si-header-dropdown-item]`

```
import { SiHeaderDropdownItemComponent } from '@siemens/element-ng/header-dropdown';
```

Creates a dropdown-item. Must be used within an [SiHeaderDropdownComponent](<index.html#SiHeaderDropdownComponent>).

```
component SiHeaderDropdownItemComponent
```

#### Input Properties

| Name | Type | Description |
| --- | --- | --- |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-item.component.ts#L32-L32>) | `string \| number \| undefined` | Badge that is rendered after the label. |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-item.component.ts#L36-L36>) | `string \| undefined` | Color of the badge (not iconBadge). |
| [checked](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-item.component.ts#L38-L38>) | `"" \| "check" \| "radio" \| undefined` | Whether the icon is checked with a radio or check mark. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-item.component.ts#L30-L30>) | `string \| undefined` | Optional icon that will be rendered before the label. |
| [iconBadge](<https://github.com/siemens/element/blob/main/projects/element-ng/header-dropdown/si-header-dropdown-item.component.ts#L34-L34>) | `string \| number \| undefined` | Badge (always red) that is attached to the icon. |

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