Ein Container gruppiert zusammengehörige Inhalte, definiert Abstände zum vorherigen und nächsten Container und kann einen Sticky-Footer enthalten.
Nummer | Typ | Beschreibung | Optional | Hinweis |
---|---|---|---|---|
1 | Slot | Beliebiger Inhalt erlaubt | Nein | |
2 | Komponente | sbb-sticky-bar | Ja | |
2a | Slot | z.B. für Action-Group | Nein |
The sbb-container
is a component that displays its content with the default page spacing. It also supports the slotting of a sbb-sticky-bar
.
<sbb-container>
<!-- Any other kind of content. -->
...
<!-- Sticky bar should go last. -->
<sbb-sticky-bar> ... </sbb-sticky-bar>
</sbb-container>
The sbb-container
content is provided via an unnamed slot.
By default sbb-container
uses the page spacing
defined in the layout documentation. Optionally the user can use the expanded
property (default: false
) to switch to the page spacing expanded
layout.
Spacing options are applied to all of the container's content, including the sbb-sticky-bar
.
The component has also four color variants that can be set using the color
property (default: white
).
<sbb-container expanded variant="milk"> ... </sbb-container>
Name | Attribute | Privacy | Type | Default | Description |
---|---|---|---|---|---|
backgroundExpanded | background-expanded | public | boolean | false | Whether the background color is shown on full container width on large screens. |
color | color | public | 'transparent' | 'white' | 'milk' | 'white' | Color of the container, like transparent, white etc. |
expanded | expanded | public | boolean | false | Whether the container is expanded. |
Name | Description |
---|---|
Use the unnamed slot to add anything to the container. | |
sticky-bar | The slot used by the sbb-sticky-bar component. |