Inhalt des Panels
Das Teaser-Panel zeigt einen kurzen Text in einer roten, trapezförmigen Fläche an. Es ist der Baustein, mit dem z.B. der Teaser-Hero seinen Text über einem Bild darstellt.
The <sbb-teaser-panel> is a simple component that displays content in a vertically centered trapezoidal shape.
By default, the component displays a background color fade effect on mouse hover.
<div style="height: ...px;">
<!-- The panel expands to fill the parent container's size -->
<sbb-teaser-panel> Panel content </sbb-teaser-panel>
</div>
To make the <sbb-teaser-panel> overlap other content, you can set position: absolute.
The parent element must have position: relative.
<div style="height: ...px; position: relative;">
<!-- It expands to overlap the parent element -->
<sbb-teaser-panel style="position: absolute"> Panel content </sbb-teaser-panel>
<div>Other content</div>
</div>
The component does not introduce any interactive elements by itself. Ensure that the content slotted into the panel is semantically correct and accessible.
If the panel is used as a clickable element, wrap it with an appropriate interactive component (e.g., <sbb-button> or <sbb-link>).
Diese Komponente gibt es auch für Angular im Paket @sbb-esta/lyne-angular.
SbbTeaserPanelElement, sbb-teaser-panel.| Name | Description |
|---|---|
| Use the unnamed slot to add text content to the panel |