Zur Navigation Zum Inhalt Kontakt Menu Trova un componente Descrizione generale Lyne Principi Base Accessibilité Sistema di design Guidelines Deutsch Français Italiano English I nostri principi di design Soluzioni focalizzate sull’utente Riconoscibilità Inclusione Riduzione Olistico Autoesplicativo Orientamento all’attività Adeguatezza Portale della marca FFS Logo Orologio digitale Diritti di utilizzazione Colori die base Colori funzionali Colori Off Brand Icone Icone dell'orario Pittogrammi Informazioni sull’accessibilità Über diesen Guide Contatti Letture consigliate Product Owner User Research Interaction Design Visual Design Development Content Design Testing What is a design system? Designing Coding FAQ Aiuto Processo Contribution Contatto Introduzione Base Componenti Overview Releases Design Tokens Komponenten Roadmap Introduzione Base Informazioni Introduzione Base Componenti Senso & scopo Community Assets Istruzioni Power-Apps Banner pubblicitari digitali SAP Icone delle app Accordion Info

Was macht die Komponente?

Versteckt Inhalt hinter einem Titel. Mit einem Klick auf den Titel kann der dazugehörige Inhalt ein- und ausgeblendet werden.

Wann soll die Komponente eingesetzt werden?

  • Um die Informationsarchitektur einer Seite zu verbessern, bzw. um Inhalt zu strukturieren.
  • Um langes Scrollen zu vermeiden.
  • Um Übersichtlichkeit zu gewährleisten/herzustellen.

Regeln

  • Ein Accordion soll aus min. zwei Einträgen bestehen.
  • Ineinander verschachtelte Akkordeons sind nicht erlaubt.
Flip-Card Expansion-Panel Expansion-Panel-Header Expansion-Panel-Content
Anatomie
Anatomie der Komponente
Nummer Typ Beschreibung Optional Hinweis
1 Komponente sbb-extension-panel Nein
2 Komponente sbb-expansion-panel-header Nein
2a Komponente sbb-icon Ja
2b Text Label Nein
2c Komponente sbb-icon Nein Zeigt den Zustand an
3 Komponente sbb-expansion-panel-content Nein
3a Slot Beliebiger Inhalt erlaubt Nein
Demo

Spielwiese

Header 1Content 1Header 2Content 2
Grössen S L Mehrere geöffnete Items erlauben Nein Ja Hintergrund White Milk Iron Charcoal Black
Default
Milk
Borderless
Disabled
Milk Borderless
With Icon
Expanded
Multi
Size S
Size S With Icon
HTML in Zwischenablage kopiert.
Implementation

The sbb-accordion is a component which acts as a container
for one or more sbb-expansion-panel.

<sbb-accordion>
  <sbb-expansion-panel>
    <sbb-expansion-panel-header>Header 1</sbb-expansion-panel-header>
    <sbb-expansion-panel-content>Content 1</sbb-expansion-panel-content>
  </sbb-expansion-panel>
  <sbb-expansion-panel>
    <sbb-expansion-panel-header>Header 2</sbb-expansion-panel-header>
    <sbb-expansion-panel-content>Content 2</sbb-expansion-panel-content>
  </sbb-expansion-panel>
</sbb-accordion>

Interaction

The multi property, if set, allows having more than one sbb-expansion-panel expanded at the same time.

<sbb-accordion multi> ... </sbb-accordion>

Style

The component has two different sizes, l (default) and s, which can be changed using the size property.
The property overrides the size value of any inner sbb-expansion-panel.

<sbb-accordion size="s"> ... </sbb-accordion>

The component has a titleLevel property, which is proxied to each inner sbb-expansion-panel-header, and can be used
to wrap the header of each sbb-expansion-panel in a heading tag; if the property is unset, a div is used.

In the following example, all the sbb-expansion-panel-header would be wrapped in a h3 heading tag.

<sbb-accordion title-level="3">
  <sbb-expansion-panel>
    <sbb-expansion-panel-header>Header 1</sbb-expansion-panel-header>
    <sbb-expansion-panel-content>Content 1</sbb-expansion-panel-content>
  </sbb-expansion-panel>
  ...
</sbb-accordion>

Properties

Name Attribute Privacy Type Default Description
multi multi public boolean false Whether more than one sbb-expansion-panel can be open at the same time.
size size public 's' | 'l' 'l' Size variant, either l or s; overrides the size on any projected sbb-expansion-panel.
titleLevel title-level public SbbTitleLevel | null null The heading level for the sbb-expansion-panel-headers within the component.

Slots

Name Description
Use the unnamed slot to add sbb-expansion-panel elements.
Trova un componente

Lyne

  • Design Tokens
  • Animation
    Animation
  • Border
    Border
  • Breakpoint
    Breakpoint
  • Color
    Color
  • Layout
    Layout
  • Shadow
    Shadow
  • Size
    Size
  • Spacing
    Spacing
  • Typography
    Typography
  • Action
  • More Info
    Action-Group
  • More Info
    Block-Link
  • More Info
    Button
  • More Info
    Link
  • More Info
    Mini-Button-Group
  • More Info
    Secondary-Button
  • More Info
    Teaser
  • More Info
    Teasser-Hero
  • More Info
    Teaser-Product
  • More Info
    Teaser-Product-Static
  • More Info
    Tertiary-Button
  • More Info
    Transparent-Button
  • Brand
  • More Info
    Clock
  • More Info
    Logo
  • Collection
  • More Info
    Link-List
  • More Info
    Link-List-Anchor
  • More Info
    Skiplink-List
  • More Info
    Table-Wrapper
  • Form
  • More Info
    Autocomplete
  • More Info
    Autocomplete-Grid
  • More Info
    Calendar
  • More Info
    Checkbox
  • More Info
    Checkbox-Group
  • More Info
    Checkbox-Panel
  • More Info
    Datepicker
  • More Info
    File-Selector
  • More Info
    Form-Field
  • More Info
    Radio-Button
  • More Info
    Radio-Button-Group
  • More Info
    Radio-Button-Panel
  • More Info
    Select
  • More Info
    Selection-Expansion-Panel
  • More Info
    Slider
  • More Info
    Toggle
  • More Info
    Toggle-Check
  • Indicator
  • More Info
    Alert
  • More Info
    Alert-Group
  • More Info
    Chip
  • More Info
    Loading-Indicator
  • More Info
    Message
  • More Info
    Notification
  • More Info
    Status
  • More Info
    Stepper
  • More Info
    Tag-Group
  • More Info
    Toast
  • Layout
  • More Info
    Accordion
  • More Info
    Card
  • More Info
    Container
  • More Info
    Divider
  • More Info
    Footer
  • More Info
    Header
  • More Info
    Title
  • Navigation
  • More Info
    Breadcrumb
  • More Info
    Breadcrumb-Group
  • More Info
    Menu
  • More Info
    Navigation
  • More Info
    Tab-Group
  • Overlay
  • More Info
    Dialog
  • More Info
    Overlay
  • More Info
    Popover
  • Time-Table
  • More Info
    Journey-Header
  • More Info
    Pearl-Chain
  • Visual asset
  • More Info
    Icon
  • More Info
    Image
Impressum Contatto Impostazioni dei cookie