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 Components Overview Base Informationen Sense & Purpose Community Assets Instructions Power-Apps Digital banner ads SAP Design Guidelines App Icons
Find component


Basics Animation Animation Border Border Grid Grid Spacings Spacings Typography Typography Components Accordion Accordion Action-Group Action-Group Alert Alert Alert-Group Alert-Group Autocomplete Autocomplete Breadcrumb Breadcrumb Breadcrumb-Group Breadcrumb-Group Button Button Calendar Calendar Card Card Card-Action Card-Action Card-Badge Card-Badge Checkbox Checkbox Checkbox-Group Checkbox-Group Chip Chip Clock Clock Container Container Datepicker Datepicker Dialog Dialog Divider Divider Expansion-Panel Expansion-Panel File-Selector File-Selector Footer Footer Form-Error Form-Error Form-Field Form-Field Form-Field-Clear Form-Field-Clear Header Header Header-Action Header-Action Icon Icon Image Image Journey-Header Journey-Header Link Link Link-List Link-List Loading-Indicator Loading-Indicator Logo Logo Menu Menu Menu-Action Menu-Action Message Message Navigation Navigation Navigation-Action Navigation-Action Navigation-List Navigation-List Navigation-Marker Navigation-Marker Navigation-Section Navigation-Section Notification Notification Popover Popover Popover-Trigger Popover-Trigger Radio-Button Radio-Button Radio-Button-Group Radio-Button-Group Select Select Selection-Panel Selection-Panel Signet Signet Skiplink-List Skiplink-List Slider Slider Status Status Sticky-Bar Sticky-Bar Tab-Group Tab-Group Tab Title Tab Title Tag Tag Tag-Group Tag-Group Teaser Teaser Teaser-Hero Teaser-Hero Time-Input Time-Input Title Title Toast Toast Toggle Toggle Toggle-Check Toggle-Check
Toggle-Check Implementation

The sbb-toggle-check is a component which provides the same functionality as a native <input type="checkbox"/>
enhanced with the SBB Design.

<sbb-toggle-check value="single-checkbox">Example</sbb-toggle-check>


It is possible to provide a label via an unnamed slot; the component can optionally display a sbb-icon
using the iconName property or via custom content using the icon slot.
The icon can be at the component start or end based on the value of the labelPosition property (default: after).

<sbb-toggle-check value="single-checkbox" icon-name="pie-small"> Example </sbb-toggle-check>

<sbb-toggle-check value="single-checkbox" icon-name="pie-small" label-position="start">
  Another example


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

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

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


Consumers can listen to the native change event on the sbb-toggle-check component to intercept the input's change;
the current state can be read from event.target.checked and the value from event.target.value.


The sbb-toggle-check component uses an internal <input type="checkbox"/> to provide an accessible experience.
This internal checkbox receives focus and is automatically labelled by the text content of the sbb-toggle-check element.
Avoid adding other interactive controls into the content of sbb-toggle-check, as this degrades the experience for users of assistive technology.

If you don't want the label to appear next to the sbb-toggle-check component,
you can not provide it and then use aria-label to specify an appropriate label for screen-readers.

<sbb-toggle-check aria-label="Subscribed to email message"></sbb-toggle-check>


Name Attribute Privacy Type Default Description
checked checked public boolean false Whether the toggle-check is checked.
value value public string | undefined Value of toggle-check.
name name public string | undefined Name of the toggle-check.
size size public 's' | 'm' 's' Size variant, either m or s.
iconName icon-name public string 'tick-small' The svg name for the true state - default -> 'tick-small'
disabled disabled public boolean false The disabled prop for the disabled state.
required required public boolean false The required prop for the required state.
labelPosition label-position public 'before' | 'after' | undefined 'after' The label position relative to the toggle. Defaults to 'after'


Name Type Description Inherited From
didChange CustomEvent<void> Deprecated. used for React. Will probably be removed once React 19 is available.


Name Description
Use the unnamed slot to add content to the toggle label.
icon Use this slot to provide an icon. If icon-name is set, a sbb-icon will be used.
Background White Milk Iron Charcoal Black
Beispiele HTML-Markup kopiert.
Imprint Contact Cookie settings