# List-Details

**List-Details** (formerly Main-detail container) is a layout pattern that shows a list of items and the corresponding details of the selected item. It allows users to stay focused on the main content (list) while accessing and editing related details without losing context.

## Usage

Use this layout when viewing details from an item in a large list or group on the same page is required.

The content in the list pane such as list, data table or simple navigation is used to control the information shown in the details pane.

Selecting an item from the list pane opens the details pane. The user can select another item from the list pane to switch content of the details pane.

List-details layouts are optimized for wider screens, while also incorporating a responsive behavior to adapt to various screen sizes.

![List-details](<../images/list-details.png>)

### When to use

- For navigating through hierarchical data structures, making it easier for users to explore and understand content.
- When there's a need to navigate through large amounts of data or items but only focus on one item at a time.
- In scenarios where users might need to switch quickly between items without losing context.

## Design

### Elements

![List-details elements](<../images/list-details-elements.png>)

1. **List pane:** Displays content types such as lists, tables or trees.
2. **List actions (optional):** These are the functions that a user can perform within the list pane.
3. **Details pane:** Displays information from the selected node, such as tables, forms or KPIs.
4. **Details title (optional):** It provides context about the information displayed, e.g. name of the selected item
5. **Details actions (optional):** Functions that can be performed within the details pane.

### Resizing the panes

The two sections can be dynamically resizable: when users hover over the dividing area, the cursor turns into a double-sided arrow, allowing for size adjustments.

![List-details resize](<../images/list-details-resize.png>)

### Edit mode

An 'Edit mode' can be optionally enabled in the details pane, allowing content modifications. When active, 'Save' and 'Cancel' actions are displayed in a footer.

The main content area is scrollable independently of the footer. This way, the footer remains visible and accessible even when the content overflows.

![List-details edit](<../images/list-details-edit.png>)

### Search and actions in list

These actions are designed to manipulate data in the list pane.

They are context-specific, meaning they directly affect the item in the list pane. For example, a bulk action to "Update user permissions" to modify settings for multiple users at once, or "Adjust settings for multiple zones" enables uniform changes across different areas in a single step.

Any button type can be used as an action. However, if more than one action is needed, they should be collapsed over a menu, or reconsidered as global actions.

![List-details actions](<../images/list-actions.png>)

### Filtering in the list

If filters are needed in the list, a filter button can be placed above the content. Applied filters can be represented with a filter bar.

If the action next to the search bar is used for another purpose, the filter button can be placed next to the applied filters.

![List-details filters](<../images/list-filters.png>)

Filters in the list pane can overlay the content to show filtering options. When activated, a panel appears, allowing users to select criteria, and then retracts to update the displayed content based on the selected filters.

![List-details filters flow](<../images/list-details-filters-flow.png>)

### Global search and actions

Unlike the actions that are exclusive to the 'List' or 'Details', global actions transcend specific areas and provide functionality that is consistently relevant regardless of the user's current focus. E.g.: A 'Create' button that initiates the process to create a new entry to the list pane.

![List-details global actions](<../images/list-details-global-actions.png>)

### Bulk actions

When multiple items can be selected, the details pane will display an [empty state](<https://element.siemens.io/components/status-notifications/empty-state/>) guiding users to either perform an action or clear the selection.

![List-details bulk actions](<../images/list-details-bulk-action.png>)

### Initial interaction

Consider the initial interaction: It can either feature a preselected item, displaying its details, or be user-initiated, where the details pane relists empty until an item is selected or created.

There can also be situations where the list pane itself is not populated until the user creates or adds an item.

In instances, where no data is immediately available, use an [empty state](<https://element.siemens.io/components/status-notifications/empty-state/>) to guide the user.

![List-details initial interaction](<../images/list-details-initial-interaction.png>)

### Responsive behavior

In responsive mode, the List-details splits into two screens: first displaying the main content, then the details of a selected node with a 'Back' button.

![List-details responsive](<../images/list-details-responsive.png>)

## Code

### Usage

```
import { SiListDetailsComponent } from '@siemens/element-ng/list-details';

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

The `<si-list-details>` represents the layout used to organize the different elements. Inside it different child template components are used to assign the content to the correct position in the list-details layout and enable the correct responsive styling, the `<si-list-pane>` and `<si-details-pane>`.

Inside the `<si-list-pane>` the following child components can be used:

- `<si-list-pane-header>`: Header of the list pane, typically containing search and actions.
- `<si-list-pane-body>`: Body of the list pane, typically containing the list or table.

Inside the `<si-details-pane>` the following child components can be used:

- `<si-details-pane-header>`: Header of the details pane, typically containing the title and actions.
- `<si-details-pane-body>`: Body of the details pane, typically containing the details content.
- `<si-details-pane-footer>`: Footer of the details pane, typically containing save and cancel actions.

It is highly advised to use at least the `<si-details-pane-header>` to show the back button in a responsive (mobile) view.

When resizing is enabled, the underlying list split part uses the `listWidthUnit` input, while the details split part always uses `unit="fr"`. The list pane uses `unit="px"` by default. Accordingly, `listWidth` defaults to `300` and represents pixels with the default configuration.

Use `listWidthUnit="fr"` to retain a relative split, where `listWidth` is the list pane's fractional weight. When resizing is disabled, `listWidth` continues to control the static layout as a percentage. For both resizable `listWidthUnit="fr"` and static layouts, values outside the inclusive range 0-100 use the standard 32/68 list/details split.

If the content may exceed the available space, the `overflow-auto` class should be applied to the body components or a child inside them.

In the standard layout, the `card` class should be applied to both the `<si-list-pane>` and `<si-details-pane>`, though it can also be moved to suite the design needs.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { CdkMenuTrigger } from '@angular/cdk/menu';
import { CommonModule } from '@angular/common';
import { ChangeDetectorRef, Component, inject } from '@angular/core';
import { SI_DATATABLE_CONFIG, SiDatatableModule } from '@siemens/element-ng/datatable';
import { SiEmptyStateModule } from '@siemens/element-ng/empty-state';
import { Filter, SiFilterBarComponent } from '@siemens/element-ng/filter-bar';
import { SiIconComponent } from '@siemens/element-ng/icon';
import {
  SiDetailsPaneBodyComponent,
  SiDetailsPaneComponent,
  SiDetailsPaneFooterComponent,
  SiDetailsPaneHeaderComponent,
  SiListDetailsComponent,
  SiListPaneBodyComponent,
  SiListPaneComponent,
  SiListPaneHeaderComponent
} from '@siemens/element-ng/list-details';
import {
  MenuItem,
  SiMenuBarDirective,
  SiMenuDirective,
  SiMenuHeaderDirective,
  SiMenuItemComponent
} from '@siemens/element-ng/menu';
import {
  BOOTSTRAP_BREAKPOINTS,
  SiResizeObserverDirective
} from '@siemens/element-ng/resize-observer';
import { SiSearchBarComponent } from '@siemens/element-ng/search-bar';
import { SiTabComponent, SiTabPortalComponent, SiTabsetComponent } from '@siemens/element-ng/tabs';
import { LOG_EVENT } from '@siemens/live-preview';
import { NgxDatatableModule } from '@siemens/ngx-datatable';

import { CorporateEmployee, DataService, PageRequest } from '../datatable/data.service';

@Component({
  selector: 'app-sample',
  imports: [
    CommonModule,
    SiListDetailsComponent,
    SiListPaneComponent,
    SiListPaneHeaderComponent,
    SiListPaneBodyComponent,
    SiDetailsPaneComponent,
    SiDetailsPaneHeaderComponent,
    SiDetailsPaneBodyComponent,
    SiDetailsPaneFooterComponent,
    SiIconComponent,
    SiMenuBarDirective,
    SiMenuItemComponent,
    SiSearchBarComponent,
    SiFilterBarComponent,
    NgxDatatableModule,
    SiDatatableModule,
    SiEmptyStateModule,
    SiMenuDirective,
    SiMenuHeaderDirective,
    CdkMenuTrigger,
    SiTabsetComponent,
    SiTabComponent,
    SiTabPortalComponent,
    SiResizeObserverDirective
  ],
  templateUrl: './si-list-details.html',
  providers: [DataService],
  host: {
    class: 'si-layout-fixed-height'
  }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);

  private dataService = inject(DataService);
  private cdRef = inject(ChangeDetectorRef);

  /**
   * List details
   */
  expandBreakpoint = BOOTSTRAP_BREAKPOINTS.mdMinimum; // this is the default
  detailsActive = false; // this is the default
  disableResizing = false;

  /**
   * To force a demonstration of the condensed layout, we use a maxWidth
   * value for the whole component.
   */
  maxWidth: number | undefined;

  /**
   * List actions
   */
  listActions: MenuItem[] = [
    {
      type: 'action',
      label: 'Add',
      action: () => this.logEvent('Add triggered')
    }
  ];

  /**
   * Filters
   */
  filters: Filter[] = [
    {
      filterName: 'date',
      title: 'Date',
      description: '27-12-2022'
    },
    {
      filterName: 'location',
      title: 'Location',
      description: 'Zug'
    }
  ];

  /**
   * List data (table)
   */
  cache: any = {};
  isLoading = 0;
  pageNumber = 0;
  pageSize = 50;
  rows: CorporateEmployee[] = [];
  selectedEntity: CorporateEmployee | undefined;
  selectedEntities: CorporateEmployee[] = [];
  tableConfig = SI_DATATABLE_CONFIG;
  totalElements = 0;
  searchTerm?: string;

  /**
   * Details data
   */
  detailsActions: MenuItem[] = [
    {
      type: 'action',
      label: 'Edit',
      action: () => this.logEvent('Edit triggered')
    }
  ];

  onDiscard(): void {
    this.logEvent('Discard');
  }

  onSave(): void {
    this.logEvent('Save');
  }

  datatableOnSelect(): void {
    this.selectedEntity = this.selectedEntities[0];
    this.detailsActive = true;
    this.logEvent(this.selectedEntities);
  }

  searchTermChanged(searchTerm: string): void {
    this.searchTerm = searchTerm;
    this.cache = {};
    this.totalElements = 0;
    this.rows = [];
    this.setPage({ offset: 0, pageSize: this.pageSize, filter: searchTerm });
  }

  setPage(pageRequest: PageRequest): void {
    pageRequest.filter = this.searchTerm;
    // current page number is determined by last call to setPage
    this.pageNumber = pageRequest.offset;

    // if page size changed, the primitive cache can't handle it, so clear
    if (this.pageSize !== pageRequest.pageSize) {
      this.cache = {};
    }
    this.pageSize = pageRequest.pageSize;

    // don't load same data twice
    if (this.cache[pageRequest.offset]) {
      return;
    }
    this.cache[pageRequest.offset] = true;

    // counter of pages loading
    this.isLoading++;

    this.dataService.getResults(pageRequest).subscribe(pagedData => {
      // create array to store data if missing
      if (!this.rows || this.totalElements !== pagedData.page.totalElements) {
        // length should be total count
        this.rows = new Array<CorporateEmployee>(pagedData.page.totalElements || 0);
      }
      // update total count
      this.totalElements = pagedData.page.totalElements;

      // calc starting index
      const start = pagedData.page.pageNumber * pagedData.page.size;

      // copy existing data
      const rows = [...this.rows];

      // insert new rows into new position
      rows.splice(start, pagedData.page.size, ...pagedData.data);

      // set rows to our new rows
      this.rows = rows;

      this.isLoading--;
      this.cdRef.markForCheck();
    });
  }
}
```

Template:

```html
<si-list-details
  #container
  stateId="si-list-details-demo"
  class="p-6 px-md-9"
  listWidthUnit="fr"
  [expandBreakpoint]="expandBreakpoint"
  [disableResizing]="disableResizing"
  [listWidth]="50"
  [minListSize]="200"
  [minDetailsSize]="100"
  [(detailsActive)]="detailsActive"
>
  <si-list-pane class="card">
    <si-list-pane-header>
      <si-search-bar
        class="flex-grow-1"
        placeholder="Search"
        colorVariant="base-0"
        [showIcon]="true"
        (searchChange)="searchTermChanged($event)"
      />
      <button
        type="button"
        class="btn btn-icon btn-tertiary"
        aria-label="Options"
        [cdkMenuTriggerFor]="contextMenu"
      >
        <si-icon class="icon" icon="element-options-vertical" />
      </button>
    </si-list-pane-header>
    <si-list-pane-header>
      <si-filter-bar
        style="width: 0"
        class="flex-grow-1 flex-shrink-1"
        colorVariant="base-0"
        [allowReset]="false"
        [filters]="filters"
        (filtersChange)="logEvent($event)"
      />
      <button
        type="button"
        class="btn btn-icon btn-tertiary-ghost element-filter"
        aria-label="Filters"
        (click)="logEvent('Filters')"
      ></button>
    </si-list-pane-header>
    <si-list-pane-body>
      <div class="si-layout-fixed-height overflow-auto">
        <ngx-datatable
          #table
          class="si-layout-fixed-height table-element focus-inside"
          siDatatableInteraction
          selectionType="single"
          columnMode="force"
          [cssClasses]="tableConfig.cssClasses"
          [rows]="rows"
          [columns]="[
            { name: 'Name', sortable: false },
            { name: 'Role', sortable: false },
            { name: 'Company', sortable: false }
          ]"
          [reorderable]="false"
          [headerHeight]="tableConfig.headerHeight"
          [rowHeight]="tableConfig.rowHeightSmall"
          [footerHeight]="0"
          [ghostLoadingIndicator]="isLoading > 0"
          [scrollbarV]="true"
          [externalPaging]="true"
          [externalSorting]="true"
          [count]="totalElements"
          [offset]="pageNumber"
          [datatableInteractionAutoSelect]="container.hasLargeSize()"
          [(selected)]="selectedEntities"
          (page)="setPage($event)"
          (selectedChange)="datatableOnSelect()"
          (siResizeObserver)="table.recalculate()"
        >
          <si-empty-state empty-content icon="element-users" heading="No users to display" />
        </ngx-datatable>
      </div>
    </si-list-pane-body>
  </si-list-pane>
  <si-details-pane class="card">
    <si-details-pane-header title="Title" [hideBackButton]="false">
      <si-tabset #tabset style="width: 0" class="flex-grow-1 flex-shrink-1">
        <si-tab heading="Overview" [active]="true">
          <div class="si-layout-fixed-height card-body" [class.text-center]="!selectedEntity">
            <p class="card-text">
              @if (selectedEntity) {
                {{ selectedEntity | json }}
              } @else {
                No entity selected.
              }
            </p>
          </div>
        </si-tab>
        <si-tab heading="History">
          <div class="mx-auto text-center">
            @if (selectedEntity) {
              History for {{ selectedEntity.name }}
            } @else {
              No entity selected.
            }
          </div>
        </si-tab>
        <si-tab heading="Advanced" [disabled]="true" />
      </si-tabset>
      <si-menu-bar>
        <si-menu-item icon="element-edit" (triggered)="logEvent('editing')">Edit</si-menu-item>
        <si-menu-item
          icon="element-refresh"
          aria-label="Refresh"
          (triggered)="logEvent('refreshing')"
        />
      </si-menu-bar>
    </si-details-pane-header>
    <si-details-pane-body>
      <si-tab-portal class="si-layout-fixed-height overflow-auto pt-4" [tabset]="tabset" />
    </si-details-pane-body>
    <si-details-pane-footer class="justify-content-end">
      <button type="button" class="btn btn-secondary" (click)="onDiscard()">Discard</button>
      <button type="button" class="btn btn-primary" (click)="onSave()">Save</button>
    </si-details-pane-footer>
  </si-details-pane>
</si-list-details>

<ng-template #contextMenu>
  <si-menu>
    <si-menu-header>Actions</si-menu-header>
    <si-menu-item icon="element-sort-down" disabled>Sort</si-menu-item>
    <si-menu-item icon="element-refresh" (triggered)="logEvent('refreshing')">Refresh</si-menu-item>
  </si-menu>
</ng-template>
```

### Default pixel sizing

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, signal } from '@angular/core';
import {
  SiDetailsPaneBodyComponent,
  SiDetailsPaneComponent,
  SiDetailsPaneHeaderComponent,
  SiListDetailsComponent,
  SiListPaneBodyComponent,
  SiListPaneComponent,
  SiListPaneHeaderComponent
} from '@siemens/element-ng/list-details';

interface Equipment {
  id: string;
  name: string;
  location: string;
  status: string;
}

@Component({
  selector: 'app-sample',
  imports: [
    SiListDetailsComponent,
    SiListPaneComponent,
    SiListPaneHeaderComponent,
    SiListPaneBodyComponent,
    SiDetailsPaneComponent,
    SiDetailsPaneHeaderComponent,
    SiDetailsPaneBodyComponent
  ],
  templateUrl: './si-list-details-pixels.html',
  host: {
    class: 'si-layout-fixed-height'
  }
})
export class SampleComponent {
  readonly equipment: Equipment[] = [
    {
      id: 'AHU-01',
      name: 'Air handling unit',
      location: 'Roof, Building A',
      status: 'Running'
    },
    {
      id: 'RC-02',
      name: 'Room controller',
      location: 'Room 204, Building A',
      status: 'Connected'
    },
    {
      id: 'HP-03',
      name: 'Heat pump',
      location: 'Plant room, Building B',
      status: 'Standby'
    }
  ];
  readonly selectedEquipment = signal(this.equipment[0]!);
  readonly detailsActive = signal(false);

  selectEquipment(equipment: Equipment): void {
    this.selectedEquipment.set(equipment);
    this.detailsActive.set(true);
  }
}
```

Template:

```html
<si-list-details
  stateId="si-list-details-pixels-demo"
  class="p-6 px-md-9"
  [(detailsActive)]="detailsActive"
>
  <si-list-pane class="card">
    <si-list-pane-header>
      <h2 class="si-h5 m-0">Equipment</h2>
    </si-list-pane-header>
    <si-list-pane-body class="overflow-auto">
      <div class="list-group list-group-flush">
        @for (item of equipment; track item.id) {
          <button
            type="button"
            class="list-group-item list-group-item-action text-start"
            [class.active]="selectedEquipment().id === item.id"
            [attr.aria-current]="selectedEquipment().id === item.id ? 'true' : null"
            (click)="selectEquipment(item)"
          >
            <span class="d-block fw-semibold">{{ item.name }}</span>
            <span class="d-block si-caption">{{ item.id }}</span>
          </button>
        }
      </div>
    </si-list-pane-body>
  </si-list-pane>
  <si-details-pane class="card">
    <si-details-pane-header [title]="selectedEquipment().name" />
    <si-details-pane-body class="p-6 overflow-auto">
      <dl class="m-0">
        <dt>Equipment ID</dt>
        <dd>{{ selectedEquipment().id }}</dd>
        <dt>Location</dt>
        <dd>{{ selectedEquipment().location }}</dd>
        <dt>Status</dt>
        <dd class="mb-0">{{ selectedEquipment().status }}</dd>
      </dl>
    </si-details-pane-body>
  </si-details-pane>
</si-list-details>
```

### Custom details header

You can also use a custom header instead of `<si-details-pane-header>`. When using a custom header:

- **Opening the pane:** The custom header must provide a responsive Back button and set focus to it immediately when opened.
- **Closing the pane:** The si-list-details component automatically restores focus to the selected list item.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import {
  afterNextRender,
  Component,
  computed,
  ElementRef,
  inject,
  Injector,
  signal,
  viewChild
} from '@angular/core';
import { elementBack, elementDelete, elementEdit } from '@siemens/element-icons';
import { SiAvatarComponent } from '@siemens/element-ng/avatar';
import { addIcons, SiIconComponent } from '@siemens/element-ng/icon';
import {
  SiDetailsPaneBodyComponent,
  SiDetailsPaneComponent,
  SiListDetailsComponent,
  SiListPaneBodyComponent,
  SiListPaneComponent,
  SiListPaneHeaderComponent
} from '@siemens/element-ng/list-details';
import { SiMenuBarDirective, SiMenuItemComponent } from '@siemens/element-ng/menu';
import { BOOTSTRAP_BREAKPOINTS } from '@siemens/element-ng/resize-observer';
import { SiTabComponent, SiTabPortalComponent, SiTabsetComponent } from '@siemens/element-ng/tabs';
import { LOG_EVENT } from '@siemens/live-preview';

type User = {
  id: number;
  name: string;
  initials: string;
  description: string;
  role: string;
  email: string;
  phone: string;
  street: string;
  city: string;
  country: string;
};

@Component({
  selector: 'app-sample',
  imports: [
    SiListDetailsComponent,
    SiListPaneComponent,
    SiListPaneHeaderComponent,
    SiListPaneBodyComponent,
    SiDetailsPaneComponent,
    SiDetailsPaneBodyComponent,
    SiAvatarComponent,
    SiIconComponent,
    SiMenuBarDirective,
    SiMenuItemComponent,
    SiTabsetComponent,
    SiTabComponent,
    SiTabPortalComponent
  ],
  templateUrl: './si-list-details-custom-header.html',
  host: {
    class: 'si-layout-fixed-height'
  }
})
export class SampleComponent {
  readonly logEvent = inject(LOG_EVENT);
  readonly icons = addIcons({ elementBack, elementDelete, elementEdit });
  readonly expandBreakpoint = BOOTSTRAP_BREAKPOINTS.mdMinimum;
  readonly detailsActive = signal(false);
  readonly users: User[] = [
    {
      id: 1,
      name: 'Jane Smith',
      initials: 'JS',
      description: 'Automation engineer focused on industrial connectivity.',
      role: 'Automation Engineer',
      email: 'jane.smith@example.org',
      phone: '+41 44 123 45 67',
      street: 'Industriestrasse 10',
      city: 'Zug 6300',
      country: 'Switzerland'
    },
    {
      id: 2,
      name: 'John Doe',
      initials: 'JD',
      description: 'Product designer creating clear and accessible experiences.',
      role: 'Product Designer',
      email: 'john.doe@example.org',
      phone: '+49 89 123 45 67',
      street: 'Example Street 24',
      city: 'Munich 80331',
      country: 'Germany'
    },
    {
      id: 3,
      name: 'Alex Johnson',
      initials: 'AJ',
      description: 'Platform architect helping teams build reliable software.',
      role: 'Platform Architect',
      email: 'alex.johnson@example.org',
      phone: '+44 20 1234 5678',
      street: 'Innovation Road 8',
      city: 'London SW1A 1AA',
      country: 'United Kingdom'
    }
  ];
  readonly selectedUser = signal<User>(this.users[0]);

  private readonly injector = inject(Injector);
  private readonly listDetails = viewChild(SiListDetailsComponent);
  private readonly backButton = viewChild<ElementRef<HTMLButtonElement>>('backButton');

  readonly showBackButton = computed(() => this.listDetails()?.hasLargeSize() === false);

  selectUser(user: User): void {
    this.selectedUser.set(user);
    this.detailsActive.set(true);

    if (this.showBackButton()) {
      afterNextRender(
        () => {
          this.backButton()?.nativeElement.focus();
        },
        { injector: this.injector }
      );
    }
  }

  backToList(): void {
    this.detailsActive.set(false);
  }

  editUser(): void {
    this.logEvent(`Edit ${this.selectedUser().name}`);
  }

  deleteUser(): void {
    this.logEvent(`Delete ${this.selectedUser().name}`);
  }
}
```

Template:

```html
<si-list-details
  class="p-6 px-md-9"
  [expandBreakpoint]="expandBreakpoint"
  [listWidth]="35"
  [minListSize]="220"
  [minDetailsSize]="320"
  [(detailsActive)]="detailsActive"
>
  <si-list-pane class="card">
    <si-list-pane-header>
      <span class="si-h5">Users</span>
    </si-list-pane-header>
    <si-list-pane-body>
      <div class="si-layout-fixed-height overflow-auto">
        <div class="list-group list-group-flush">
          @for (user of users; track user.id) {
            <button
              type="button"
              class="list-group-item list-group-item-action d-flex align-items-center gap-4"
              [class.active]="selectedUser().id === user.id"
              [attr.aria-current]="selectedUser().id === user.id ? 'true' : null"
              [attr.aria-label]="'Select ' + user.name"
              (click)="selectUser(user)"
            >
              <si-avatar
                size="small"
                autoColor="true"
                [initials]="user.initials"
                [altText]="user.name"
              />
              <span class="d-flex flex-column text-start overflow-hidden">
                <span class="si-body-sbold text-truncate">{{ user.name }}</span>
                <span class="si-body-sm text-secondary text-truncate">{{ user.role }}</span>
              </span>
            </button>
          }
        </div>
      </div>
    </si-list-pane-body>
  </si-list-pane>

  <si-details-pane class="card">
    <header class="flex-shrink-0">
      <div class="d-flex align-items-center gap-4 p-6">
        @if (showBackButton()) {
          <button
            #backButton
            type="button"
            class="btn btn-icon btn-tertiary flex-shrink-0"
            aria-label="Back to users"
            (click)="backToList()"
          >
            <si-icon class="icon" [icon]="icons.elementBack" />
          </button>
        }
        <si-avatar
          size="regular"
          autoColor="true"
          class="flex-shrink-0"
          [initials]="selectedUser().initials"
          [altText]="selectedUser().name"
        />
        <div class="flex-grow-1 overflow-hidden">
          <h2 class="si-h4 text-truncate mb-1">{{ selectedUser().name }}</h2>
          <p class="si-body-paragraph text-secondary text-wrap mb-0">
            {{ selectedUser().description }}
          </p>
        </div>
        <si-menu-bar class="flex-shrink-0" aria-label="User actions">
          <si-menu-item [icon]="icons.elementEdit" (triggered)="editUser()">Edit</si-menu-item>
          <si-menu-item [icon]="icons.elementDelete" (triggered)="deleteUser()"
            >Delete</si-menu-item
          >
        </si-menu-bar>
      </div>

      <div class="nav-tabs d-flex align-items-center px-6">
        <si-tabset #tabset class="flex-fill overflow-hidden">
          <si-tab heading="General" [active]="true">
            <div class="p-6">
              <dl class="row mb-0">
                <dt class="col-sm-4">Role</dt>
                <dd class="col-sm-8">{{ selectedUser().role }}</dd>
                <dt class="col-sm-4">Email</dt>
                <dd class="col-sm-8">{{ selectedUser().email }}</dd>
                <dt class="col-sm-4">Phone</dt>
                <dd class="col-sm-8">{{ selectedUser().phone }}</dd>
              </dl>
            </div>
          </si-tab>
          <si-tab heading="Address">
            <div class="p-6">
              <address class="mb-0">
                {{ selectedUser().street }}<br />
                {{ selectedUser().city }}<br />
                {{ selectedUser().country }}
              </address>
            </div>
          </si-tab>
        </si-tabset>
      </div>
    </header>

    <si-details-pane-body>
      <si-tab-portal class="si-layout-fixed-height overflow-auto" [tabset]="tabset" />
    </si-details-pane-body>
  </si-details-pane>
</si-list-details>
```

### [SiListDetailsComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L45-L272>)

**Kind:** component

**Selector:** `si-list-details`

```
import { SiListDetailsComponent } from '@siemens/element-ng/list-details';
```

```
component SiListDetailsComponent implements OnInit, OnChanges, OnDestroy
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [detailsActive](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L80-L80>) | `boolean` | `false` | Whether the details are currently active or not, mostly relevant in the responsive scenario when the viewport only shows either the list or the detail. |
| [disableResizing](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L89-L89>) | `boolean` | `false` | Whether the list and detail parts should be resizable by a splitter or not. This is only supported in the 'large' scenario (when `hasLargeSize` is `true`). Default value is `false`. |
| [expandBreakpoint](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L67-L67>) | `number` | `BOOTSTRAP_BREAKPOINTS.mdMinimum` | A numeric value defining the minimum width in px, which the component needs to be displayed in its large layout. Whenever smaller than this threshold, the small layout will be used. Default is value is BOOTSTRAP\_BREAKPOINTS.mdMinimum. |
| [listWidth](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L101-L101>) | `number` | `300` | The list pane size, updated when the split is resized or restored. With resizing enabled, the value uses [listWidthUnit](<index.html#SiListDetailsComponent.listWidthUnit>): pixels for `px`, or a percentage-based fractional weight for `fr`. With resizing disabled, the value is always interpreted as a percentage. Percentage values must be in the inclusive range 0-100; values outside this range fall back to a 32/68 list/details split. |
| [listWidthUnit](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L108-L108>) | `SplitUnit` | `'px'` | Unit used for the list split part when resizing is enabled. |
| [minDetailsSize](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L122-L122>) | `number` | `300` | Sets the minimal width of the detail component in pixel. |
| [minListSize](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L115-L115>) | `number` | `300` | Sets the minimal width of the list component in pixel. |
| [stateId](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L128-L128>) | `string \| undefined` |  | An optional stateId to uniquely identify a component instance. Required for persistence of ui state. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [detailsActiveChange](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L80-L80>) | `boolean` | Whether the details are currently active or not, mostly relevant in the responsive scenario when the viewport only shows either the list or the detail. |
| [listWidthChange](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L101-L101>) | `number` | The list pane size, updated when the split is resized or restored. With resizing enabled, the value uses [listWidthUnit](<index.html#SiListDetailsComponent.listWidthUnit>): pixels for `px`, or a percentage-based fractional weight for `fr`. With resizing disabled, the value is always interpreted as a percentage. Percentage values must be in the inclusive range 0-100; values outside this range fall back to a 32/68 list/details split. |

#### Attributes and Methods

##### hasLargeSize

[Source for hasLargeSize](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-details.component.ts#L69-L72>)

**Modifiers:** readonly

**Type:** `Signal<boolean>`

**Default:** `...`

### [SiListPaneComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-pane/si-list-pane.component.ts#L23-L43>)

**Kind:** component

**Selector:** `si-list-pane`

```
import { SiListPaneComponent } from '@siemens/element-ng/list-details';
```

```
component SiListPaneComponent
```

### [SiListPaneHeaderComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-pane-header/si-list-pane-header.component.ts#L12-L12>)

**Kind:** component

**Selector:** `si-list-pane-header`

```
import { SiListPaneHeaderComponent } from '@siemens/element-ng/list-details';
```

```
component SiListPaneHeaderComponent
```

### [SiListPaneBodyComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-list-pane-body/si-list-pane-body.component.ts#L12-L12>)

**Kind:** component

**Selector:** `si-list-pane-body`

```
import { SiListPaneBodyComponent } from '@siemens/element-ng/list-details';
```

```
component SiListPaneBodyComponent
```

### [SiDetailsPaneComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-details-pane/si-details-pane.component.ts#L25-L48>)

**Kind:** component

**Selector:** `si-details-pane`

```
import { SiDetailsPaneComponent } from '@siemens/element-ng/list-details';
```

```
component SiDetailsPaneComponent
```

### [SiDetailsPaneHeaderComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-details-pane-header/si-details-pane-header.component.ts#L32-L100>)

**Kind:** component

**Selector:** `si-details-pane-header`

```
import { SiDetailsPaneHeaderComponent } from '@siemens/element-ng/list-details';
```

```
component SiDetailsPaneHeaderComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [backButtonText](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-details-pane-header/si-details-pane-header.component.ts#L59-L59>) | `TranslatableString` | `` $localize`:@@SI_LIST_DETAILS.BACK:Back` `` | Details back button text. Required for a11y. |
| [backButtonUrl](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-details-pane-header/si-details-pane-header.component.ts#L67-L67>) | `string` | `'../'` | The URL to navigate to when the back buttons is clicked. This is only used when the `si-details-pane` is used with a router-outlet. |
| [hideBackButton](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-details-pane-header/si-details-pane-header.component.ts#L49-L49>) | `boolean` | `false` | You can hide the back button in the mobile view by setting true. Required in add, edit workflows on mobile sizes. During add or edit, the back button should be hidden. Default value is `false`. |
| [title](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-details-pane-header/si-details-pane-header.component.ts#L40-L40>) | `TranslatableString \| undefined` |  | Optional title to be displayed. |

### [SiDetailsPaneBodyComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-details-pane-body/si-details-pane-body.component.ts#L13-L13>)

**Kind:** component

**Selector:** `si-details-pane-body`

```
import { SiDetailsPaneBodyComponent } from '@siemens/element-ng/list-details';
```

```
component SiDetailsPaneBodyComponent
```

### [SiDetailsPaneFooterComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/list-details/si-details-pane-footer/si-details-pane-footer.component.ts#L13-L13>)

**Kind:** component

**Selector:** `si-details-pane-footer`

```
import { SiDetailsPaneFooterComponent } from '@siemens/element-ng/list-details';
```

```
component SiDetailsPaneFooterComponent
```

### Types Documentation

### [SplitUnit](<https://github.com/siemens/element/blob/main/projects/element-ng/split/si-split.interfaces.ts#L8-L8>)

**Kind:** type alias

```
import type { SplitUnit } from '@siemens/element-ng/split';
```

```
type SplitUnit = 'px' | 'fr'
```

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

## Code (legacy)

### Usage

```
import { SiMainDetailContainerComponent } from '@siemens/element-ng/main-detail-container';

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

The `<si-main-detail-container>` represents the layout container used to organize the different elements. The `slot` attribute on the child elements is used to assign them to the correct position in the list-details layout.

The `slot` attribute accepts one of the following values:

- `mainSearch`: Search field for the main list
- `mainActions`: Content actions for the main list
- `mainData`: List/table to show the main data
- `details`: Details pane
- `detailActions`: Content actions for the details pane

When `resizableParts` is enabled, the main split part uses the `mainContainerWidthUnit` input (`unit="px"` by default), while the detail part always uses `unit="fr"`. The `mainContainerWidth` value is interpreted using `mainContainerWidthUnit`; for example, `300` means `300px` with the default configuration. Use `mainContainerWidthUnit="fr"` to retain a relative split, where `mainContainerWidth` is the main part's fractional weight.

When the component is not resizable, `mainContainerWidth` continues to be interpreted as a percentage for the static layout.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { CommonModule } from '@angular/common';
import { ChangeDetectorRef, Component, inject, viewChild } from '@angular/core';
import { FormsModule } from '@angular/forms';
import {
  ContentActionBarMainItem,
  SiContentActionBarComponent
} from '@siemens/element-ng/content-action-bar';
import { SI_DATATABLE_CONFIG, SiDatatableModule } from '@siemens/element-ng/datatable';
import { SiEmptyStateComponent } from '@siemens/element-ng/empty-state';
import { SiFormItemComponent } from '@siemens/element-ng/form';
import { SiMainDetailContainerComponent } from '@siemens/element-ng/main-detail-container';
import { BOOTSTRAP_BREAKPOINTS } from '@siemens/element-ng/resize-observer';
import { SiSearchBarModule } from '@siemens/element-ng/search-bar';
import { LOG_EVENT } from '@siemens/live-preview';
import { DatatableComponent, NgxDatatableModule } from '@siemens/ngx-datatable';

import { CorporateEmployee, DataService, PageRequest } from '../datatable/data.service';

@Component({
  selector: 'app-sample',
  imports: [
    CommonModule,
    FormsModule,
    SiMainDetailContainerComponent,
    SiSearchBarModule,
    SiContentActionBarComponent,
    NgxDatatableModule,
    SiDatatableModule,
    SiEmptyStateComponent,
    SiFormItemComponent
  ],
  templateUrl: './si-main-detail-container.html',
  styleUrl: './si-main-detail-container.scss',
  providers: [DataService],
  host: {
    class: 'si-layout-fixed-height'
  }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  private dataService = inject(DataService);
  private cdRef = inject(ChangeDetectorRef);

  /**
   * Main detail container
   */
  largeLayoutBreakpoint = BOOTSTRAP_BREAKPOINTS.mdMinimum; // this is the default
  detailsActive = false; // this is the default
  heading = 'Main-Detail Container Example';
  truncateHeading = true;
  detailsHeading = 'Details';
  resizableParts = true;
  isLarge = true;

  /**
   * To force a demonstration of the condensed layout, we use a maxWidth
   * value for the whole container.
   */
  containerMaxWidth: number | undefined;

  /**
   * Main actions
   */
  public mainActions: ContentActionBarMainItem[] = [
    {
      type: 'action',
      label: 'Add',
      action: () => this.logEvent('Add triggered'),
      disabled: false
    }
  ];

  /**
   * Main data (table)
   */
  cache: any = {};
  isLoading = 0;
  pageNumber = 0;
  pageSize = 50;
  rows: CorporateEmployee[] = [];
  selectedEntity: CorporateEmployee | undefined;
  selectedEntities: CorporateEmployee[] = [];
  tableConfig = SI_DATATABLE_CONFIG;
  totalElements = 0;
  searchTerm?: string;

  /**
   * Detail data
   */
  detailActions: ContentActionBarMainItem[] = [
    {
      type: 'action',
      label: 'Edit',
      action: () => this.logEvent('Edit triggered'),
      disabled: false
    }
  ];
  private readonly table = viewChild.required(DatatableComponent);

  datatableOnSelect(): void {
    this.selectedEntity = this.selectedEntities[0];
    this.detailsActive = true;
    this.logEvent(this.selectedEntities);
  }

  searchTermChanged(searchTerm: string): void {
    this.searchTerm = searchTerm;
    this.cache = {};
    this.totalElements = 0;
    this.rows = [];
    this.setPage({ offset: 0, pageSize: this.pageSize, filter: searchTerm });
  }

  setPage(pageRequest: PageRequest): void {
    pageRequest.filter = this.searchTerm;
    // current page number is determined by last call to setPage
    this.pageNumber = pageRequest.offset;

    // if page size changed, the primitive cache can't handle it, so clear
    if (this.pageSize !== pageRequest.pageSize) {
      this.cache = {};
    }
    this.pageSize = pageRequest.pageSize;

    // don't load same data twice
    if (this.cache[pageRequest.offset]) {
      return;
    }
    this.cache[pageRequest.offset] = true;

    // counter of pages loading
    this.isLoading++;

    this.dataService.getResults(pageRequest).subscribe(pagedData => {
      // create array to store data if missing
      if (!this.rows || this.totalElements !== pagedData.page.totalElements) {
        // length should be total count
        this.rows = new Array<CorporateEmployee>(pagedData.page.totalElements || 0);
      }
      // update total count
      this.totalElements = pagedData.page.totalElements;

      // calc starting index
      const start = pagedData.page.pageNumber * pagedData.page.size;

      // copy existing data
      const rows = [...this.rows];

      // insert new rows into new position
      rows.splice(start, pagedData.page.size, ...pagedData.data);

      // set rows to our new rows
      this.rows = rows;

      this.isLoading--;
      this.cdRef.markForCheck();
    });
  }

  toggleMobileLayout(condensed: boolean): void {
    this.containerMaxWidth = condensed ? BOOTSTRAP_BREAKPOINTS.smMinimum : undefined;
    setTimeout(() => {
      window.dispatchEvent(new Event('resize'));
    });
  }

  onSplitChange(containerWidth: number | 'default'): void {
    this.logEvent(`Main width is ${containerWidth}%.`);
    // eslint-disable-next-line @typescript-eslint/no-deprecated
    this.table().recalculate();
  }
}
```

Template:

```html
<si-main-detail-container
  stateId="si-main-detail-demo"
  mainContainerWidthUnit="fr"
  [style.maxWidth.px]="containerMaxWidth ? containerMaxWidth : null"
  [largeLayoutBreakpoint]="largeLayoutBreakpoint"
  [heading]="heading"
  [truncateHeading]="truncateHeading"
  [detailsHeading]="detailsHeading"
  [resizableParts]="resizableParts"
  [hideBackButton]="false"
  [mainContainerWidth]="50"
  [minMainSize]="200"
  [minDetailSize]="100"
  [(detailsActive)]="detailsActive"
  (hasLargeSizeChange)="isLarge = $event"
  (mainContainerWidthChange)="onSplitChange($event)"
>
  <si-search-bar
    slot="mainSearch"
    placeholder="Search"
    (searchChange)="searchTermChanged($event)"
  />
  <si-content-action-bar slot="mainActions" viewType="collapsible" [primaryActions]="mainActions" />

  <ngx-datatable
    #table
    slot="mainData"
    class="list-view table-element"
    siDatatableInteraction
    columnMode="force"
    selectionType="single"
    [cssClasses]="tableConfig.cssClasses"
    [rows]="rows"
    [columns]="[
      { name: 'Name', sortable: false },
      { name: 'Role', sortable: false },
      { name: 'Company', sortable: false }
    ]"
    [reorderable]="false"
    [headerHeight]="tableConfig.headerHeight"
    [rowHeight]="tableConfig.rowHeightSmall"
    [footerHeight]="0"
    [ghostLoadingIndicator]="isLoading > 0"
    [scrollbarV]="true"
    [externalPaging]="true"
    [externalSorting]="true"
    [count]="totalElements"
    [offset]="pageNumber"
    [datatableInteractionAutoSelect]="isLarge"
    [(selected)]="selectedEntities"
    (page)="setPage($event)"
    (selectedChange)="datatableOnSelect()"
  >
    <si-empty-state empty-content icon="element-users" heading="No users to display" />
  </ngx-datatable>

  <!-- Detail (content slots: detailActions | details) -->
  <!-- detailActions -->
  <si-content-action-bar
    slot="detailActions"
    viewType="collapsible"
    [primaryActions]="detailActions"
  />
  <!-- details -->
  <div slot="details" class="card">
    <div class="card-body overflow-auto pt-4">
      @if (selectedEntity) {
        {{ selectedEntity | json }}
      } @else {
        <div class="mx-auto text-center">No entity selected.</div>
      }
    </div>
  </div>
</si-main-detail-container>

<div class="e2e-ignore">
  <hr />
  <form class="px-6 px-md-9 pb-6 pt-5">
    <div class="card">
      <div class="card-header">Settings</div>
      <div class="card-body">
        <si-form-item label="Resizable parts">
          <input
            type="checkbox"
            class="form-check-input"
            id="customCheckResizableParts"
            name="resizableParts"
            [(ngModel)]="resizableParts"
          />
        </si-form-item>
        <si-form-item label="Simulate mobile layout">
          <input
            type="checkbox"
            class="form-check-input"
            id="customCheckMobileLayout"
            name="simulateMobileLayout"
            ngModel
            (ngModelChange)="toggleMobileLayout($event)"
          />
        </si-form-item>
      </div>
    </div>
  </form>
</div>
```

### [SiMainDetailContainerComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L52-L353>)

**Kind:** component

**Selector:** `si-main-detail-container`

```
import { SiMainDetailContainerComponent } from '@siemens/element-ng/main-detail-container';
```

```
component SiMainDetailContainerComponent implements OnInit, OnChanges
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [containerClass](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L149-L149>) | `string` | `'px-6 pt-6 px-md-9'` | CSS class(es) applied to the outermost container. Per default, Bootstrap classes to handle responsive paddings are applied: `px-6 pt-6 px-md-9`. |
| [detailContainerClass](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L165-L165>) | `string` | `'pb-6'` | CSS class(es) applied to the detail container. In combination with `containerClass`, this allows for settings individual padding and margin values on the individual containers. |
| [detailsActive](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L91-L91>) | `boolean` | `false` | Whether the details are currently active or not, mostly relevant in the responsive scenario when the viewport only shows either the main or the detail. |
| [detailsBackButtonText](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L141-L141>) | `TranslatableString` | `` $localize`:@@SI_MAIN_DETAIL_CONTAINER.BACK:Back` `` | Details back button text. Required for a11y. |
| [detailsHeading](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L113-L113>) | `TranslatableString` | `''` | The heading of the detail area. |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L98-L98>) | `TranslatableString` | `''` | The heading of the main-detail layout component, usually a page heading. |
| [hideBackButton](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L131-L131>) | `boolean` | `false` | You can hide the back button in the mobile view by setting true. Required in add, edit workflows on mobile sizes. During add or edit, the back button should be hidden. Default value is `false`. |
| [largeLayoutBreakpoint](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L71-L71>) | `number` | `BOOTSTRAP_BREAKPOINTS.mdMinimum` | A numeric value defining the minimum width in px, which the container needs to be displayed in its large layout. Whenever smaller than this threshold, the small layout will be used. Default is value is BOOTSTRAP\_BREAKPOINTS.mdMinimum. |
| [mainContainerClass](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L157-L157>) | `string` | `'pb-6'` | CSS class(es) applied to the main container. In combination with `containerClass`, this allows for settings individual padding and margin values on the individual containers. |
| [mainContainerWidth](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L189-L189>) | `number \| "default"` | `'default'` | The size of the main container. When [resizableParts](<index.html#SiMainDetailContainerComponent.resizableParts>) is enabled, the value is interpreted using [mainContainerWidthUnit](<index.html#SiMainDetailContainerComponent.mainContainerWidthUnit>) and updates as the splitter is moved. With `mainContainerWidthUnit="fr"`, numeric values must be from `0` to `100` (inclusive). The main and detail fractional weights are the value and `100 - value`; out-of-range values fall back to `32` and `68`. In the static layout, numeric values represent a percentage from `0` to `100` (inclusive); out-of-range values leave both containers without max-size constraints. Pixel widths are not limited to the `0` to `100` range.<br><br>With `'default'`, resizable pixel layouts use [minMainSize](<index.html#SiMainDetailContainerComponent.minMainSize>), resizable fractional layouts use main and detail weights of `32` and `68`, and static layouts use `50%`. |
| [mainContainerWidthUnit](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L172-L172>) | `SplitUnit` | `'px'` | Unit used for the main split part when [resizableParts](<index.html#SiMainDetailContainerComponent.resizableParts>) is enabled. |
| [minDetailSize](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L201-L201>) | `number` | `300` | Sets the minimal width of the detail container in pixel. |
| [minMainSize](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L195-L195>) | `number` | `300` | Sets the minimal width of the main container in pixel. |
| [resizableParts](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L122-L122>) | `boolean` | `false` | Whether the main and detail parts should be resizable by a splitter or not. This is only supported in the 'large' scenario (when `hasLargeSize` is `true`). Default value is `false`. |
| [stateId](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L206-L206>) | `string \| undefined` |  | An optional stateId to uniquely identify a component instance. Required for persistence of ui state. |
| [truncateHeading](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L106-L106>) | `boolean` | `false` | Whether the heading should be truncated (single line) or not. Default value is `false`. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [detailsActiveChange](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L91-L91>) | `boolean` | Whether the details are currently active or not, mostly relevant in the responsive scenario when the viewport only shows either the main or the detail. |
| [hasLargeSizeChange](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L83-L83>) | `boolean` | Emits whether the components size is large enough to display main and details views next to each other or not. |
| [mainContainerWidthChange](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L189-L189>) | `number \| "default"` | The size of the main container. When [resizableParts](<index.html#SiMainDetailContainerComponent.resizableParts>) is enabled, the value is interpreted using [mainContainerWidthUnit](<index.html#SiMainDetailContainerComponent.mainContainerWidthUnit>) and updates as the splitter is moved. With `mainContainerWidthUnit="fr"`, numeric values must be from `0` to `100` (inclusive). The main and detail fractional weights are the value and `100 - value`; out-of-range values fall back to `32` and `68`. In the static layout, numeric values represent a percentage from `0` to `100` (inclusive); out-of-range values leave both containers without max-size constraints. Pixel widths are not limited to the `0` to `100` range.<br><br>With `'default'`, resizable pixel layouts use [minMainSize](<index.html#SiMainDetailContainerComponent.minMainSize>), resizable fractional layouts use main and detail weights of `32` and `68`, and static layouts use `50%`. |

#### Attributes and Methods

##### hasLargeSize

[Source for hasLargeSize](<https://github.com/siemens/element/blob/main/projects/element-ng/main-detail-container/si-main-detail-container.component.ts#L77-L77>)

**Type:** `boolean`

Whether the main-detail layout component has a large size or not, `true` if the container´s width matches or exceeds the `largeLayoutBreakpoint`.
