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-Item Info

Was macht die Komponente?

Sie ist Teil der Carousel-List-Komponente.

Wann soll die Komponente eingesetzt werden?

  • Nur innerhalb der Carousel-List-Komponente.
Carousel-List
Demo Native
Sbb Image
HTML in Zwischenablage kopiert.
Implementation

The sbb-carousel-item represents a single item within a sbb-carousel;
it is meant to be slotted in a sbb-carousel-list.

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

<sbb-carousel-item>
  <sbb-image
    image-src="../image.jpg"
    alt="SBB image"
    style="width: 800px; height: 600px;"
  ></sbb-image>
</sbb-carousel-item>

<sbb-carousel-item>
  <div class="sbb-image">
    <img src="../image.jpg" alt="SBB image" height="300" width="400" />
    <figcaption>Caption for picture</figcaption>
  </div>
</sbb-carousel-item>

Slots

The content is projected in an unnamed slot.

The component supports native img tags, sbb-image, picture and also custom content, appropriately formatted;
since it doesn't have a fixed size, it's important for consumers to define the dimensions of slotted images to correctly render the component.

Events

The component provides two events, named beforeshow and show; their emission is related to scroll events in the sbb-carousel-list.

Accessibility

Following the ARIA carousel pattern,
the component has role="group" and aria-roledescription="slide".
If the aria-label attribute is not provided, it is set by the sbb-carousel-list with a default text.

Events

Name Type Description Inherited From
beforeshow CustomEvent<SbbCarouselItemEventDetail> Event emitted when the item is starting scrolling.
show CustomEvent<SbbCarouselItemEventDetail> Event emitted when the item is full visible after scrolling.

Slots

Name Description
Use the unnamed slot to add images for the carousel, as , , , ...