Zur Navigation Zum Inhalt Kontakt Menu Komponente finden Übersicht Lyne 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 Funktionale 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 Basis Komponenten Übersicht Basis Komponenten Übersicht Releases Design Tokens Komponenten Übersicht Basis Informationen Sinn & Zweck Community Assets Anleitung Power-Apps Digitale Werbebanner SAP App Icons Toggle-Option Implementation

The sbb-toggle-option component is used inside the
sbb-toggle in order to render the toggle's options.

<sbb-toggle-option value="Value">Option</sbb-toggle-option>

Slots

It is possible to provide a label via an unnamed slot; the component can optionally display a sbb-icon
at the component start using the iconName property or via custom content using the icon slot.
Text and icon are not exclusive and can be used together.

<sbb-toggle-option value="Value" icon-name="app-icon-small"></sbb-toggle-option>

<sbb-toggle-option value="Value" icon-name="app-icon-small">Option</sbb-toggle-option>

States

The component can be displayed in checked or disabled states using the self-named properties.

<sbb-toggle-option value="Value" checked>Option</sbb-toggle-option>

<sbb-toggle-option value="Value" disabled>Option</sbb-toggle-option>

Properties

Name Attribute Privacy Type Default Description
checked checked public boolean false Whether the toggle-option is checked.
disabled disabled public boolean false Whether the toggle option is disabled.
value value public string | null null Value of toggle-option.
iconName icon-name public string | undefined The icon name we want to use, choose from the small icon variants from the ui-icons category from here https://icons.app.sbb.ch.

Slots

Name Description
Use the unnamed slot to add content to the label of the toggle option.
icon Slot used to render the sbb-icon.
Beispiele
Default
Icon Only
Label And Icon
Icon Only Slotted
Label And Icon Slotted
HTML-Markup kopiert.
Komponente finden

Lyne

Impressum Kontakt Cookie Einstellungen