# SiMainDetailContainerComponent documentation

**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`.

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