# System banner

The **system banner** is a prominent message displayed at the top of the screen to communicate system-wide updates, status changes, or information about the environment.

## Usage

The system banner is placed above the [application header](<https://element.siemens.io/components/layout-navigation/application-header/>) to highlight important system-wide messages. It supports various status types, including `information`, `success`, `caution`, `warning`, `danger` and `critical`.

![System banner](<../images/system-banner.png>)

### When to use

- To inform users about critical updates or changes.
- To notify users of any errors or issues.
- To provide important notifications, such as maintenance schedules or security alerts.

### Best practices

- Keep messages brief and easy to understand.
- Use clear, simple language. Avoid jargon and technical terms.
- Limit system banners to essential information to prevent clutter.
- Display system banners only when relevant to the user's context.

## Design

### Elements

![System banner elements](<../images/system-banner-elements.png>)

> 1. Background, 2. Text message

### Variants

![System banner variants](<../images/system-banner-variants.png>)

## Code

### Usage

```
import { SiSystemBannerComponent } from '@siemens/element-ng/system-banner';

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

```
<si-system-banner message="This is an information" [status]="'info'" />
```

To display a system banner above the [application header](<https://element.siemens.io/components/layout-navigation/application-header/>), apply these classes:

- `.fixed-top` on `si-system-banner` places the banner at the top of the viewport.
- `.has-system-banner` on the outer layout container makes the application header, vertical navigation and side panel leave room for the banner. All affected components must be inside this container.
- `.has-application-header` or `.has-navbar-fixed-top` on the page-content wrapper adds padding so the content is not covered by the fixed header and banner.

If [si-side-panel](<https://element.siemens.io/components/layout-navigation/side-panel/>) is the outer layout container, put `.has-system-banner` on `si-side-panel` itself, not just on its inner content wrapper:

```
<si-side-panel class="has-system-banner">
  <div class="has-navbar-fixed-top">
    <si-system-banner class="fixed-top" message="Scheduled maintenance" status="info" />
    <si-application-header>...</si-application-header>
    <!-- Page content -->
  </div>
  <si-side-panel-content heading="Details">...</si-side-panel-content>
</si-side-panel>
```

When the banner is hidden, remove `.has-system-banner` as well. For a conditional banner, use the same visibility condition for rendering the banner and applying this class.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component } from '@angular/core';
import { RouterLink } from '@angular/router';
import { SiAccordionComponent, SiCollapsiblePanelComponent } from '@siemens/element-ng/accordion';
import {
  App,
  AppCategory,
  SiAccountDetailsComponent,
  SiApplicationHeaderComponent,
  SiHeaderAccountItemComponent,
  SiHeaderActionItemComponent,
  SiHeaderActionsDirective,
  SiHeaderBrandDirective,
  SiHeaderCollapsibleActionsComponent,
  SiHeaderLogoDirective,
  SiLaunchpadFactoryComponent
} from '@siemens/element-ng/application-header';
import { BreadcrumbItem, SiBreadcrumbComponent } from '@siemens/element-ng/breadcrumb';
import {
  ContentActionBarMainItem,
  SiContentActionBarComponent
} from '@siemens/element-ng/content-action-bar';
import {
  SiHeaderDropdownComponent,
  SiHeaderDropdownItemComponent,
  SiHeaderDropdownTriggerDirective
} from '@siemens/element-ng/header-dropdown';
import { MenuItem } from '@siemens/element-ng/menu';
import { NavbarVerticalItem, SiNavbarVerticalComponent } from '@siemens/element-ng/navbar-vertical';
import { SiSearchBarComponent } from '@siemens/element-ng/search-bar';
import { SiSidePanelComponent, SiSidePanelContentComponent } from '@siemens/element-ng/side-panel';
import { SiStatusBarComponent, StatusBarItem } from '@siemens/element-ng/status-bar';
import { SiSystemBannerComponent } from '@siemens/element-ng/system-banner';

@Component({
  selector: 'app-sample',
  imports: [
    RouterLink,
    SiAccordionComponent,
    SiAccountDetailsComponent,
    SiApplicationHeaderComponent,
    SiBreadcrumbComponent,
    SiCollapsiblePanelComponent,
    SiContentActionBarComponent,
    SiHeaderAccountItemComponent,
    SiHeaderActionItemComponent,
    SiHeaderActionsDirective,
    SiHeaderBrandDirective,
    SiHeaderCollapsibleActionsComponent,
    SiHeaderDropdownComponent,
    SiHeaderDropdownItemComponent,
    SiHeaderDropdownTriggerDirective,
    SiLaunchpadFactoryComponent,
    SiNavbarVerticalComponent,
    SiSearchBarComponent,
    SiSidePanelComponent,
    SiSidePanelContentComponent,
    SiStatusBarComponent,
    SiSystemBannerComponent,
    SiHeaderLogoDirective
  ],
  templateUrl: './anatomy.html'
})
export class SampleComponent {
  breadcrumbItems: BreadcrumbItem[] = [
    { title: 'Root', link: 'root' },
    { title: 'Level 1', link: ['root', 'level1'] },
    { title: 'Level 2', link: ['root', 'level1', 'level2'] }
  ];

  statusItems: StatusBarItem[] = [
    { title: 'Security', status: 'danger', value: 4 },
    { title: 'Update', status: 'warning', value: 14 },
    { title: 'Information', status: 'info', value: 37 }
  ];

  verticalNavbarItems: NavbarVerticalItem[] = [
    {
      type: 'group',
      label: 'Home',
      icon: 'element-home',
      children: [
        {
          type: 'router-link',
          label: 'Sub Item',
          routerLink: 'subItem',
          badge: 4,
          badgeColor: 'warning'
        },
        {
          type: 'router-link',
          label: 'Sub Item 2',
          routerLink: 'subItem2'
        },
        {
          type: 'router-link',
          label: 'Sub Item 3',
          routerLink: 'subItem3'
        }
      ]
    },
    {
      type: 'group',
      label: 'Documentation',
      icon: 'element-document',
      children: [
        {
          type: 'router-link',
          label: 'Sub Item 4',
          routerLink: 'subItem4'
        },
        {
          type: 'router-link',
          label: 'Sub Item 5',
          routerLink: 'subItem5'
        },
        {
          type: 'router-link',
          label: 'Sub Item 6',
          routerLink: 'subItem6'
        }
      ]
    },
    {
      type: 'router-link',
      label: 'Energy & Sustainability',
      icon: 'element-trend',
      routerLink: 'energy'
    },
    {
      type: 'router-link',
      label: 'Test Coverage',
      icon: 'element-diagnostic',
      routerLink: 'coverage'
    }
  ];

  primaryActions: ContentActionBarMainItem[] = [
    {
      type: 'action',
      label: 'Print',
      icon: 'element-print',
      action: () => alert('Print')
    },
    {
      type: 'action',
      label: 'Share',
      icon: 'element-share',
      action: () => alert('Share')
    },
    {
      type: 'group',
      label: 'Save As',
      icon: 'element-save',
      children: [
        {
          type: 'action',
          label: 'Save as New Trend',
          action: () => alert('Save as New Trend')
        },
        {
          type: 'action',
          label: 'Save as a Copy',
          action: () => alert('Save as a Copy')
        },
        {
          type: 'action',
          label: 'Save as a Template',
          action: () => alert('Save as a Template')
        }
      ]
    }
  ];

  secondaryActions: MenuItem[] = [
    {
      type: 'group',
      label: 'Download as',
      icon: 'element-download',
      children: [
        {
          type: 'action',
          label: 'Image',
          action: () => alert('Image')
        },
        {
          type: 'action',
          label: 'File',
          action: () => alert('File')
        }
      ]
    },
    {
      type: 'action',
      label: 'Copy',
      icon: 'element-copy',
      action: () => alert('Copy')
    },
    {
      type: 'action',
      label: 'Hide',
      icon: 'element-hide',
      action: () => alert('Hide')
    },
    {
      type: 'action',
      label: 'Export',
      icon: 'element-export',
      action: () => alert('Export')
    },
    {
      type: 'action',
      label: 'Favorite',
      icon: 'element-favorite',
      action: () => alert('Favorite')
    }
  ];

  categories: AppCategory[] = [
    {
      name: 'All apps',
      apps: [
        {
          name: 'Assets',
          iconUrl: './assets/app-icons/assets.svg',
          href: '.'
        },
        {
          name: 'Fischbach',
          iconUrl: './assets/app-icons/fischbach.svg',
          favorite: true,
          href: '.'
        },
        {
          name: 'Rocket',
          iconUrl: './assets/app-icons/rocket.svg',
          href: '.'
        },
        {
          name: 'Statistics',
          iconUrl: './assets/app-icons/statistics.svg',
          href: '.'
        }
      ]
    }
  ];

  updateFavorite({ app, favorite }: { app: App; favorite: boolean }): void {
    app.favorite = favorite;
    this.categories = [...this.categories];
  }
}
```

Template:

```html
<div class="has-navbar-fixed-top has-system-banner si-layout-fixed-height h-100">
  <si-system-banner
    class="fixed-top"
    message="System maintenance scheduled for 2 AM - 4 AM UTC"
    status="info"
  />
  <si-application-header [launchpad]="launchpad">
    <si-header-brand>
      <a siHeaderLogo routerLink="/"></a>
      <h1 class="application-name">Application name</h1>
    </si-header-brand>

    <si-header-actions>
      <si-header-collapsible-actions>
        <button
          si-header-action-item
          type="button"
          icon="element-help"
          [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>

  <si-navbar-vertical
    navbarCollapseButtonText="collapse"
    navbarExpandButtonText="expand"
    [items]="verticalNavbarItems"
  >
    <si-side-panel mode="scroll" [collapsible]="true">
      <div class="si-layout-main-padding si-layout-fixed-height">
        <si-status-bar class="si-layout-status si-layout-top-element" blink [items]="statusItems" />
        <si-breadcrumb class="si-layout-breadcrumb" [items]="breadcrumbItems" />
        <div class="si-layout-header">
          <h2 class="si-layout-title">Title describing what page content to expect</h2>
          <p class="si-layout-subtitle">Lorem ipsum dolor sit amet, ...</p>

          <si-content-action-bar
            class="si-layout-actions"
            viewType="expanded"
            [primaryActions]="primaryActions"
            [secondaryActions]="secondaryActions"
          />
        </div>

        <div class="mb-6">
          <div class="row gy-6">
            <si-search-bar placeholder="Search" class="col-12 col-md" [showIcon]="true" />
            <div class="col-auto">
              <button type="button" class="btn btn-secondary">Toolbar item</button>
            </div>
          </div>
        </div>

        <div class="border rounded-2 si-layout-fixed-height p-4 mb-5"
          >Placeholder for the content of the page, using the fixed height layout.</div
        >
      </div>

      <si-side-panel-content heading="Cooling coil" displayMode="overlay" [searchable]="true">
        <si-accordion [fullHeight]="true">
          <si-collapsible-panel
            heading="Properties"
            icon="element-settings"
            contentCssClasses="p-6"
          >
            And here we have some content
          </si-collapsible-panel>
          <si-collapsible-panel heading="Documents" icon="element-document" contentCssClasses="p-6">
            And this is the content
          </si-collapsible-panel>
          <si-collapsible-panel heading="Graphics" icon="element-image" contentCssClasses="p-6">
            Nothing to see here
          </si-collapsible-panel>
        </si-accordion>
      </si-side-panel-content>
    </si-side-panel>
  </si-navbar-vertical>
</div>

<ng-template #launchpad>
  <si-launchpad-factory
    enableFavorites
    [apps]="categories"
    (favoriteChange)="updateFavorite($event)"
  />
</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>

<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>
    <button si-header-dropdown-item type="button">German</button>
    <button si-header-dropdown-item type="button">English</button>
  </si-header-dropdown>
</ng-template>
```

### System banner with different statuses

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component } from '@angular/core';
import { SiSystemBannerComponent } from '@siemens/element-ng/system-banner';

@Component({
  selector: 'app-sample',
  imports: [SiSystemBannerComponent],
  templateUrl: './si-system-banner.html'
})
export class SampleComponent {}
```

Template:

```html
<div class="py-5 d-flex flex-column gap-4">
  <si-system-banner message="This is an information" status="info" />
  <si-system-banner message="This is a warning" status="warning" />
  <si-system-banner message="This is a caution" status="caution" />
  <si-system-banner message="This is an error" status="danger" />
  <si-system-banner message="This is a critical error" status="critical" />
  <si-system-banner>
    <span>Update available</span>&nbsp;
    <a href="https://element.siemens.io/">Learn more</a>
  </si-system-banner>
</div>
```

### [SiSystemBannerComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/system-banner/system-banner.component.ts#L22-L36>)

**Kind:** component

**Selector:** `si-system-banner`

```
import { SiSystemBannerComponent } from '@siemens/element-ng/system-banner';
```

The system banner component displays a message with specific status as background. Use this component for displaying system level messages on top of the page.

```
component SiSystemBannerComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [message](<https://github.com/siemens/element/blob/main/projects/element-ng/system-banner/system-banner.component.ts#L33-L33>) | `TranslatableString \| undefined` |  | Message to be displayed in the system banner. |
| [status](<https://github.com/siemens/element/blob/main/projects/element-ng/system-banner/system-banner.component.ts#L29-L29>) | `ExtendedStatusType` | `'info'` | Status of the system banner. Possible values are 'info', 'success', 'warning', 'caution', 'danger', 'critical'. |

### Types Documentation

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

**Kind:** type alias

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

```
type ExtendedStatusType = StatusType | 'unknown'
```

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

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