# Launchpad

The **launchpad** provides a way for the user to easily navigate between applications.

## Usage

![Launchpad](<../images/launchpad.png>)

### When to use

- Use a launchpad to give the user the possibility to launch apps or switch between apps easily within one application.

### Best practices

- If there are a lot of apps, it's recommended for this component to include recently used apps, frequently used apps.
- If the list is a manageable size, include all apps or products available on the system.
- Allow users to manage the applications.
- Only use the launchpad for more than two apps.

## Design

### Elements

![Launchpad](<../images/launchpad-usage-construction.png>)

> 1. Title, 2. App with icon, 3. App with logo, 4. App name, 5. System name (optional), 6. Close

The app is represented by the app logo or alternatively by an icon.

### States

![Launchpad](<../images/launchpad-usage-states.png>)

> 1. Current app, 2. Hover state, 3. Focused

### Categories (optional)

![Launchpad categories](<../images/launchpad-usage-categories.png>)

> 1. Category title

If there is a large number of applications it is possible to organize and group them for a better overview. Apps should be grouped in a logical and meaningful way.

### Favorites (optional)

![Launchpad favorites](<../images/launchpad-usage-favorites-collapsed.png>)

For a better overview, the concept of **favorites** allows the user to only show the most important apps at a glance and to hide less frequent used ones.

![Launchpad favorites expanded](<../images/launchpad-usage-favorites-expanded.png>)

> 1. Title, 2. Expand/Collapse-toggle, 3. Favorite app, 4. Standard app

In the expanded view, the user can click on the **star**-icon to mark the app as a favorite one. The app will then be part of the favorite apps category. To unstar an app the user simply clicks on the **star**-icon again.

Both concepts of **Categories** and **Favorites** can be mixed if necessary.

### Open app in separate tab (optional)

![Launchpad external app](<../images/launchpad-usage-external-app.png>)

> 1. Open app in separate tab

Apps opening in a separate tab must be marked by an additional `element-export` icon. The original tab remains open to allow a fast and easy return to the current app.

### Responsive behavior

By decreasing the viewport size the apps within the launchpad will be stacked. For screen sizes \<768px (sm and xs), the layout switches to a vertical list.

![Launchpad responsive](<../images/launchpad-responsive.png>)

## Code

The launchpad (`si-launchpad-factory`) ist part of the [application header](<https://element.siemens.io/components/layout-navigation/application-header/>).

Wrap it inside a `ng-template` and provide the template to the `si-application-header` component.

```
<si-application-header [launchpad]="launchpad"> ... </si-application-header>

<ng-template #launchpad>
  <si-launchpad-factory [apps]="myAppsOrCategories" />
</ng-template>
```

### Example

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, computed, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterLink } from '@angular/router';
import {
  App,
  AppCategory,
  SiApplicationHeaderComponent,
  SiHeaderBrandDirective,
  SiHeaderLogoDirective,
  SiLaunchpadFactoryComponent
} from '@siemens/element-ng/application-header';
import { SiFormItemComponent } from '@siemens/element-ng/form';

@Component({
  selector: 'app-sample',
  imports: [
    SiApplicationHeaderComponent,
    RouterLink,
    SiHeaderBrandDirective,
    SiLaunchpadFactoryComponent,
    SiHeaderLogoDirective,
    FormsModule,
    SiFormItemComponent
  ],
  templateUrl: './si-launchpad.html'
})
export class SampleComponent {
  readonly enableFavorites = signal(true);
  readonly enableCategories = signal(false);
  readonly wrapAppLabels = signal(false);

  private readonly businessApps = signal<App[]>([
    {
      name: 'Assets',
      systemName: 'System name',
      iconUrl: './assets/app-icons/assets.svg',
      favorite: true,
      href: '.'
    },
    {
      name: 'Fischbach',
      systemName: 'System name',
      iconUrl: './assets/app-icons/fischbach.svg',
      favorite: true,
      active: true,
      href: '.'
    },
    {
      name: 'Statistics and performance analytics',
      systemName: 'Building automation and monitoring system',
      iconUrl: './assets/app-icons/statistics.svg',
      favorite: true,
      type: 'router-link',
      routerLink: 'stats'
    }
  ]);
  private readonly toolApps = signal<App[]>([
    {
      name: 'Rocket',
      systemName: 'System name',
      iconUrl: './assets/app-icons/rocket.svg',
      favorite: true,
      href: '.'
    },
    {
      name: 'This is a really long name',
      systemName: 'System name',
      iconUrl: './assets/app-icons/assets.svg',
      external: true,
      href: '.'
    }
  ]);
  private appCounter = 0;
  private readonly otherApps = signal<App[]>(
    Array.from({ length: 11 }, (_, i) => ({
      name: i === 3 ? 'This is a really long name' : `App name ${++this.appCounter}`,
      systemName: i === 6 ? 'This is a really long name' : 'System name',
      iconUrl: './assets/app-icons/assets.svg',
      external: [0, 3].includes(i),
      href: '.'
    }))
  );

  readonly apps = computed((): App[] | AppCategory[] => {
    if (!this.enableCategories()) {
      return [...this.businessApps(), ...this.toolApps(), ...this.otherApps()];
    }

    return [
      { name: 'Business Applications', apps: this.businessApps() },
      { name: 'System Tools', apps: this.toolApps() },
      { name: 'Other Applications', apps: this.otherApps() }
    ].filter(category => category.apps.length > 0);
  });

  updateFavorite({ app, favorite }: { app: App; favorite: boolean }): void {
    for (const category of [this.businessApps, this.toolApps, this.otherApps]) {
      const match = category().find(a => a === app);
      if (match) {
        category.update(apps => {
          return apps.map(a => (a === app ? { ...a, favorite } : a));
        });
        break;
      }
    }
  }
}
```

Template:

```html
<div class="has-navbar-fixed-top">
  <si-application-header [launchpad]="launchpad">
    <si-header-brand>
      <a siHeaderLogo routerLink="/"></a>
    </si-header-brand>
  </si-application-header>

  <ng-template #launchpad>
    <si-launchpad-factory
      [apps]="apps()"
      [enableFavorites]="enableFavorites()"
      [wrapAppLabels]="wrapAppLabels()"
      (favoriteChange)="updateFavorite($event)"
    />
  </ng-template>

  <div class="container-fluid p-6 e2e-ignore">
    <div class="row">
      <div class="col-12 col-lg-6">
        <div class="card border-0 shadow-1">
          <div class="card-body p-6">
            <h2 class="si-h3 mb-4">Launchpad Configuration</h2>
            <p class="text-secondary mb-6">
              Configure your launchpad settings and test different display modes.
            </p>
            <si-form-item class="form-switch" label="Enable Favorites">
              <input class="form-check-input" type="checkbox" [(ngModel)]="enableFavorites" />
            </si-form-item>
            <si-form-item class="form-switch" label="Enable Categories">
              <input class="form-check-input" type="checkbox" [(ngModel)]="enableCategories" />
            </si-form-item>
            <si-form-item class="form-switch" label="Wrap app labels">
              <input class="form-check-input" type="checkbox" [(ngModel)]="wrapAppLabels" />
            </si-form-item>
            <div class="mt-5 pt-4 border-top">
              <p class="text-secondary mb-0">
                <small>
                  <strong>Demo note:</strong> Click the header icon to open the launchpad and test
                  your settings
                </small>
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
```

### [SiLaunchpadFactoryComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L31-L134>)

**Kind:** component

**Selector:** `si-launchpad-factory`

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

```
component SiLaunchpadFactoryComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [apps](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L59-L59>) (required) | `App[] \| AppCategory[]` |  | All app items shown in the launchpad. |
| [closeText](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L40-L40>) | `TranslatableString` | `` $localize`:@@SI_LAUNCHPAD.CLOSE:Close launchpad` `` | Text to close the launchpad. Needed for a11y. |
| [enableFavorites](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L74-L74>) | `boolean` | `false` | Allow the user to select favorite apps which will then be displayed at the top. |
| [favoriteAppsText](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L84-L84>) | `TranslatableString` | `` $localize`:@@SI_LAUNCHPAD.FAVORITE_APPS:Favorites` `` | Title of the favorite apps section. |
| [showLessAppsText](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L97-L97>) (deprecated) | `unknown` |  | Deprecated: This input no longer has an effect. [showMoreAppsText](<index.html#SiLaunchpadFactoryComponent.showMoreAppsText>) is shown in all cases. |
| [showMoreAppsText](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L94-L94>) | `TranslatableString` | `` $localize`:@@SI_LAUNCHPAD.SHOW_MORE:Show more` `` | Title of the show more apps button. |
| [subtitleText](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L56-L56>) | `TranslatableString \| undefined` |  | Subtitle of the launchpad. When not provided, no subtitle is displayed. |
| [titleText](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L50-L50>) | `TranslatableString` | `` $localize`:@@SI_LAUNCHPAD.TITLE:Switch app` `` | Title of the launchpad. |
| [wrapAppLabels](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L67-L67>) | `boolean` | `false` | Wrap app names and descriptions instead of truncating them and showing a tooltip. Rows within each section have equal height in this mode. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [favoriteChange](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad-factory.component.ts#L99-L99>) | `FavoriteChangeEvent` |  |

### Types Documentation

### [App](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L53-L53>)

**Kind:** type alias

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

```
type App = AppLink | AppRouterLink
```

### [AppCategory](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L31-L36>)

**Kind:** interface

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

Represents a categories in the launchpad.

```
interface AppCategory
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [apps](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L35-L35>) | `App[]` | The apps to show under this category. |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L33-L33>) (optional) | `TranslatableString` | The name of the app category. |

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

### [FavoriteChangeEvent](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L55-L58>)

**Kind:** interface

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

```
interface FavoriteChangeEvent
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [app](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L56-L56>) | `App` |  |
| [favorite](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L57-L57>) | `boolean` |  |

### [AppLink](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L9-L18>)

**Kind:** interface

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

Represents an app to be shown in the launchpad.

```
interface AppLink extends AppBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [active](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L17-L17>) (optional) | `boolean` | Whether the app is the currently running app. |
| [external](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L50-L50>) (optional, inherited) | `boolean` | Whether the app should be marked as external.<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [favorite](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L48-L48>) (optional, inherited) | `boolean` | Whether the app is marked as favorite.<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [href](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L13-L13>) | `string` | URL destination of the app. |
| [iconClass](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L46-L46>) (optional, inherited) | `string` | CSS class to apply, which should render the icon. Typically, "element-\*".<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [iconUrl](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L44-L44>) (optional, inherited) | `string` | Icon of the app.<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L40-L40>) (inherited) | `TranslatableString` | Name of the app<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [systemName](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L42-L42>) (optional, inherited) | `TranslatableString` | Name of the related system.<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [target](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L15-L15>) (optional) | `string` | Value for the anchor target attribute. |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L11-L11>) (optional) | `"link"` | The type of the app. can be either 'link' or 'router-link' |

### [AppRouterLink](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L20-L28>)

**Kind:** interface

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

```
interface AppRouterLink extends AppBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [activeMatchOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L27-L27>) (optional) | `{ exact: boolean; } \| IsActiveMatchOptions` | Active match options for routerLinkActive [https://angular.dev/api/router/IsActiveMatchOptions](<https://angular.dev/api/router/IsActiveMatchOptions>). |
| [external](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L50-L50>) (optional, inherited) | `boolean` | Whether the app should be marked as external.<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [extras](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L25-L25>) (optional) | `NavigationExtras` | Navigation extras that are passed to the [https://angular.dev/api/router/NavigationExtras](<https://angular.dev/api/router/NavigationExtras>). |
| [favorite](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L48-L48>) (optional, inherited) | `boolean` | Whether the app is marked as favorite.<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [iconClass](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L46-L46>) (optional, inherited) | `string` | CSS class to apply, which should render the icon. Typically, "element-\*".<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [iconUrl](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L44-L44>) (optional, inherited) | `string` | Icon of the app.<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L40-L40>) (inherited) | `TranslatableString` | Name of the app<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [routerLink](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L23-L23>) | `string \| any[]` | Link for the angular router. Accepts the same values as [https://angular.dev/api/router/RouterLink](<https://angular.dev/api/router/RouterLink>). |
| [systemName](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L42-L42>) (optional, inherited) | `TranslatableString` | Name of the related system.<br><br>Inherited from [AppBase](<index.html#t:AppBase>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L21-L21>) | `"router-link"` |  |

### [AppBase](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L38-L51>)

**Kind:** interface

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

```
interface AppBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [external](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L50-L50>) (optional) | `boolean` | Whether the app should be marked as external. |
| [favorite](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L48-L48>) (optional) | `boolean` | Whether the app is marked as favorite. |
| [iconClass](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L46-L46>) (optional) | `string` | CSS class to apply, which should render the icon. Typically, "element-\*". |
| [iconUrl](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L44-L44>) (optional) | `string` | Icon of the app. |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L40-L40>) | `TranslatableString` | Name of the app |
| [systemName](<https://github.com/siemens/element/blob/main/projects/element-ng/application-header/launchpad/si-launchpad.model.ts#L42-L42>) (optional) | `TranslatableString` | Name of the related system. |
