Prinzipien Grundlagen Barrierefreiheit Design System Guidelines Deutsch Français Italiano English Unsere Gestaltungsprinzipien Nutzerzentriert Wiedererkennbar Inklusiv Reduziert Ganzheitlich Selbsterklärend Aufgabenorientiert Passend SBB Markenportal Logo Digitale Uhr Nutzungsrechte Basis-Farben Zusätzliche Farben Off-Brand Farben Icons Fahrplan-Icons Piktogramme Über Barrierefreiheit Über diesen Guide Kontakt Weitere Informationen Product Owner User Research Interaction Design Visual Design Development Content Design Testing Was ist ein Design System?​ Designing Coding FAQ Hilfe Prozess Contribution Kontakt Übersicht Basis Komponenten Übersicht Releases Design Tokens Komponenten Übersicht Basis Informationen Übersicht Basis Komponenten Übersicht Power-Apps Digitale Werbebanner SAP AI Design: Grundlagen App Icons Carousel-List Info

Was macht die Komponente?

Sie ist Teil der Carousel-Komponente.

Wann soll die Komponente eingesetzt werden?

  • Nur innerhalb der Carousel-Komponente.
Carousel-Item Carousel
Demo Default
HTML in Zwischenablage kopiert.
Implementation

The sbb-carousel-list is a wrapper component for sbb-carousel-item,
and it's meant to be used within a sbb-carousel.

<sbb-carousel-list>
  <sbb-carousel-item>
    <img src="../image-0.jpg" alt="SBB image" height="300" width="400" />
  </sbb-carousel-item>
  <sbb-carousel-item>
    <img src="../image-1.jpg" alt="SBB image" height="300" width="400" />
  </sbb-carousel-item>
  <sbb-carousel-item>
    <img src="../image-2.jpg" alt="SBB image" height="300" width="400" />
  </sbb-carousel-item>
</sbb-carousel-list>

Slots

The content is projected in the unnamed slot.

Style

The carousel determines its dimensions by reading the dimensions from the first slotted sbb-carousel-item element.
It is the consumers' responsibility to set the correct height and width of the items, and to ensure that they are all the same size.

These dimensions are read only once, when the component is first connected to the DOM or first becomes visible.
In special cases, such as when the carousel size needs to be responsive, it is recommended to manually
set the width and height CSS properties on the sbb-carousel-list element.
Manually set dimensions will take precedence over the automatically read dimensions.

Events

The sbb-carousel-list component takes care of the emission of the beforeshow and show events on the slotted sbb-carousel-items.

An IntersectionController manages the emission of both, with different thresholds (0.01 for beforeshow and 0.99 for show).

Accessibility

Following the ARIA carousel pattern,
the component has aria-atomic='true' and aria-live='polite'.
If no aria-label is provided on the slotted sbb-carousel-items, the component set a default value on them.

Slots

Name Description
Use the unnamed slot to add sbb-carousel-item elements.