# Info page

**Info pages** are used when a page-level situation interrupts the normal route and users need a clear explanation and a way forward.

## Usage

Info pages are helpful to display missing routes, unavailable resources, authorization boundaries and server-side failures, as well as other standalone informational pages that need the same focused layout.

They can use **icons or illustrations** to support the message's meaning and make it easier to understand.

![Info page](<../images/info-page.png>)

### When to use

- Use it to show an error that blocks the user, such as a broken link or a page that can't load (e.g., [HTTP error pages](<https://element.siemens.io/patterns/http-error-pages/>)).
- Use it to prompt a required action before the user can continue, such as joining a company or accepting an invitation.
- Don't use it for errors that can be fixed inline. Show a message next to the field or action instead.

### Best practices

- Focus the page on one situation and one clear next step
- Don't use info pages for transient failures while users remain in their current workflow.
- Don't use info pages for an ordinary lack of content, use an [empty state](<https://element.siemens.io/components/status-notifications/empty-state/>) instead.

## Design

### Elements

![Info page elements](<../images/info-page-elements.png>)

1. **Image**: The image can be an icon or illustration that is semantically associated with the current view.
2. **Title**: A short and concise title to explain the topic.
3. **Description (optional)**: Brief supporting text that explains the situation or the next step.
4. **Actions (optional)**: Actions that help users recover, navigate away or request support.

## Code

### Usage

```
import { RouterModule } from '@angular/router';
import { SiInfoPageComponent } from '@siemens/element-ng/info-page';

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

Use the `si-info-page` component on a page of your application and set the input properties as needed. All input strings are sent to the translate pipe by the component.

### Default info page

The component comes with an integrated icon. Configure the icon, icon color, set the text as needed and provide a link to leave the page again.

#### Example

Component:

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

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

Template:

```html
<si-info-page
  icon="element-warning-filled"
  iconColor="status-warning"
  titleText="Report could not be generated."
  description="An error occurred while generating the report. Contact your administrator to get more information."
  [link]="{ title: 'Go back', link: '/' }"
/>
```

### Stacked icon

Use the `&lt;si-icon/&gt;` component and add the `.si-info-image` CSS class to configure a stacked icon according to your needs. Any elements with the `.si-info-image` class will replace the internal icon component using content projection.

Use content projection and add the CSS class `.si-info-actions` to the surrounding element to inject `Actions`.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component } from '@angular/core';
import { SiIconComponent } from '@siemens/element-ng/icon';
import { SiInfoPageComponent } from '@siemens/element-ng/info-page';

@Component({
  selector: 'app-sample',
  imports: [SiInfoPageComponent, SiIconComponent],
  templateUrl: './si-info-page-stacked-icon.html'
})
export class SampleComponent {
  face = 'element-state-face-neutral';
}
```

Template:

```html
<si-info-page
  titleText="Access request pending"
  description="Awaiting administrator approval. A confirmation will be sent by email."
>
  <span class="icon-size icon-stack si-info-image">
    <si-icon class="status-success" icon="element-shield-filled" />
    <si-icon class="status-success-contrast" [icon]="face" />
  </span>
  <div class="si-info-actions">
    <button
      type="button"
      class="btn btn-secondary me-6 mb-6"
      (click)="face = 'element-state-face-very-unhappy'"
    >
      Contact administrator
    </button>
    <button
      type="button"
      class="btn btn-secondary me-6 mb-6"
      (click)="face = 'element-state-face-confused'"
    >
      Cancel request
    </button>

    <button
      type="button"
      class="btn btn-primary me-6 mb-6"
      (click)="face = 'element-state-face-very-happy'"
    >
      Back to application
    </button>
  </div>
</si-info-page>
```

### Illustrations

Use the `&lt;img/&gt;` element with Angular's `NgOptimizedImage` directive and add the `.si-info-image` CSS class to change the info page image to an illustration. Provide the image using `ngSrc` and set its `width` and `height` up front, preserving the source image's aspect ratio to prevent distortion.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { NgOptimizedImage } from '@angular/common';
import { Component, inject } from '@angular/core';
import { SiInfoPageComponent } from '@siemens/element-ng/info-page';
import { LOG_EVENT } from '@siemens/live-preview';

@Component({
  selector: 'app-sample',
  imports: [SiInfoPageComponent, NgOptimizedImage],
  templateUrl: './si-info-page-illustration.html'
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
}
```

Template:

```html
<si-info-page
  titleText="Invitation to join the company."
  description="Administrator has shared the company Sample Co. with this account."
>
  <img
    alt="Nice illustration"
    class="si-info-image"
    ngSrc="./assets/images/illustration-single-theme-hand.png"
    width="258.22"
    height="196"
  />
  <div class="si-info-actions">
    <button type="button" class="btn btn-secondary me-6 mb-6" (click)="logEvent('Contact support')"
      >Secondary Action 1</button
    >
    <button type="button" class="btn btn-primary me-6 mb-6" (click)="logEvent('Submit information')"
      >Primary Action</button
    >
  </div>
</si-info-page>
```

### [SiInfoPageComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/info-page/si-info-page.component.ts#L22-L60>)

**Kind:** component

**Selector:** `si-info-page`

```
import { SiInfoPageComponent } from '@siemens/element-ng/info-page';
```

The component displays application info messages. A message uses an icon and a title, optionally a description and a link. Replace the integrated icon by content projection of another icon or image with the CSS class `.si-info-image`. Use content projection with the CSS class `si-info-actions` to inject more buttons and options to interact with the page.

```
component SiInfoPageComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [copyText](<https://github.com/siemens/element/blob/main/projects/element-ng/info-page/si-info-page.component.ts#L46-L46>) (deprecated) | `TranslatableString \| undefined` |  | A more detailed explanation of the error, outlining the reasoning for it and how a user can resolve it.<br><br>Deprecated: Use [description](<index.html#SiInfoPageComponent.description>) instead. |
| [description](<https://github.com/siemens/element/blob/main/projects/element-ng/info-page/si-info-page.component.ts#L40-L40>) | `TranslatableString \| undefined` |  | Brief supporting text that explains the situation or the next step. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/info-page/si-info-page.component.ts#L28-L28>) | `string` | `'element-warning-filled'` | The element warning icon. |
| [iconColor](<https://github.com/siemens/element/blob/main/projects/element-ng/info-page/si-info-page.component.ts#L34-L34>) | `string \| undefined` | `'status-warning'` | Icon color class, see [https://element.siemens.io/fundamentals/typography/\#color-variants-classes](<https://element.siemens.io/fundamentals/typography/#color-variants-classes>) |
| [instructions](<https://github.com/siemens/element/blob/main/projects/element-ng/info-page/si-info-page.component.ts#L52-L52>) (deprecated) | `TranslatableString \| undefined` |  | A detailed instruction on how a user can resolve the error.<br><br>Deprecated: Use [description](<index.html#SiInfoPageComponent.description>) instead. |
| [link](<https://github.com/siemens/element/blob/main/projects/element-ng/info-page/si-info-page.component.ts#L59-L59>) | `Link \| undefined` |  | Use the link object if you have one option to follow. A link object has a title to be displayed and can be configured with an external link, a router link, or a custom action. If you want to provide multiple options, add your own content into the component. |
| [titleText](<https://github.com/siemens/element/blob/main/projects/element-ng/info-page/si-info-page.component.ts#L36-L36>) (required) | `TranslatableString` |  | A short and concise title to explain the error. |

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