Skip to content

SiMainDetailContainerComponent documentation

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

Input Properties

NameTypeDefaultDescription
containerClass
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
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
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
TranslatableString $localize`:@@SI_MAIN_DETAIL_CONTAINER.BACK:Back`

Details back button text. Required for a11y.

detailsHeading
TranslatableString ''

The heading of the detail area.

heading
TranslatableString ''

The heading of the main-detail layout component, usually a page heading.

hideBackButton
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
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
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
number | "default" 'default'

The size of the main container. When resizableParts is enabled, the value is interpreted using 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.

With 'default', resizable pixel layouts use minMainSize, resizable fractional layouts use main and detail weights of 32 and 68, and static layouts use 50%.

mainContainerWidthUnit
SplitUnit 'px'

Unit used for the main split part when resizableParts is enabled.

minDetailSize
number 300

Sets the minimal width of the detail container in pixel.

minMainSize
number 300

Sets the minimal width of the main container in pixel.

resizableParts
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
string | undefined

An optional stateId to uniquely identify a component instance. Required for persistence of ui state.

truncateHeading
boolean false

Whether the heading should be truncated (single line) or not. Default value is false.

Output Properties

NameTypeDescription
detailsActiveChange
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
boolean

Emits whether the components size is large enough to display main and details views next to each other or not.

mainContainerWidthChange
number | "default"

The size of the main container. When resizableParts is enabled, the value is interpreted using 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.

With 'default', resizable pixel layouts use minMainSize, resizable fractional layouts use main and detail weights of 32 and 68, and static layouts use 50%.

Attributes and Methods

NameTypeDescription
hasLargeSize
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

'px' | 'fr'
type alias
import type { SplitUnit } from '@siemens/element-ng/split';
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.


Except where otherwise noted, content on this site is licensed under MIT License.