Zur Navigation Zum Inhalt Kontakt Menu Find component Overview Lyne Principles Foundation Accessibility Design System Guidelines Deutsch Français Italiano English Our design principles User-centred Recognisable Inclusive Reduced Holistic Self-explanatory Task-oriented Appropriate SBB Brand portal Logo Digital clock Rights of use Base colors Functional colors Off brand colors Icons Timetable icons Pictograms About accessibility Über diesen Guide Contact Further information Product Owner User Research Interaction Design Visual Design Development Content Design Testing What is a design system? Designing Coding FAQ Help Process Contribution Contact Overview Base Components Overview Base Components Overview Base Components Overview Releases Design Tokens Komponenten Overview Base Informationen Sense & Purpose Community Assets Instructions Power-Apps Digital banner ads SAP Design Guidelines App Icons Optgroup Implementation

The sbb-optgroup is a component used to group more sbb-option
within a sbb-autocomplete
or a sbb-select component.

A sbb-divider is displayed at the bottom of the component.

Slots

It is possible to provide a set of sbb-option via an unnamed slot;
the component has also a label property as name of the group.

<sbb-optgroup label="Group">
  <sbb-option value="1" selected>1</sbb-option>
  <sbb-option value="2">2</sbb-option>
  <sbb-option value="3">3</sbb-option>
</sbb-optgroup>

States

The component has a disabled property which sets all the sbb-option in the group as disabled.

<sbb-optgroup label="Disabled group" disabled>
  <sbb-option value="A">A</sbb-option>
  <sbb-option value="B">B</sbb-option>
  <sbb-option value="C">C</sbb-option>
</sbb-optgroup>

Properties

Name Attribute Privacy Type Default Description
label label public string Option group label.
disabled disabled public boolean false Whether the component is disabled.

Slots

Name Description
Use the unnamed slot to add sbb-option elements to the sbb-optgroup.
Examples
Standalone
Autocomplete
Select
Multiple Select
HTML-Markup kopiert.
Playground
Option 1Option 2Option 3Option 1Option 2Option 3
Disabled Nein Ja Hintergrund White Milk Iron Charcoal Black
Imprint Contact Cookie settings