Intro

The Switch (DNA) component defines the standardized switch pattern for Data & Analytics products, providing consistent behavior and usage guidance for binary toggle interactions across experiences.

When to Use

Do

Use the switch:

  • When a change takes immediate effect.
  • With static text (i.e., text stays the same regardless of the switch’s state).
  • When there are 2 or more switches in a group, use a group label or title

Don't

Don't use a switch:

  • If the user has to choose several options or perform extra steps for changes to become effective. Use a checkbox instead.
  • With dynamic text (i.e., text changes based on the switch’s state).
  • With a group label or title for a single switch. Use the switch text to describe the function instead.

Anatomy

  1. Label or Title (optional): Describes a group of 2 or more related switches
  2. Switch: Switch component from the SAP Web UI Kit that can be toggled on and off
  3. Text (optional): Describes the switch’s function

Anatomy diagram of a switch group component with three callout markers: 1 pointing to the group label "Label:", 2 pointing to the toggle switch, and 3 pointing to the individual switch label "Feature A".

Anatomy of the Switch (DNA)

Adding Additional Switches

Steps

  1. Select the Switch Group slot.
  2. Click and drag the white handle downward to add switches, or drag it upward to remove switches.
  3. Alternatively, you can add a switch by duplicating or copy/pasting an existing switch inside the Switch Group.

A switch group component with a dashed pink border showing two enabled toggles labeled "Feature A" and "Feature B", with a drag cursor indicator at the bottom right.

Common Switch Patterns

Single Switch

A single enabled toggle switch labeled "Feature A".

Single Switch

Switch Group with Label (Vertical)

A switch group with a label "Label:" positioned above two vertically-stacked enabled toggles labeled "Feature A" and "Feature B".

Switch Group with Label (Vertical)

Switch Group with Label (Horizontal)

A switch group with an inline label "Label:" to the left, containing two enabled toggles labeled "Feature A" and "Feature B" stacked vertically.

Switch Group with Label (Horizontal)

Switch Group with Title

A switch group with a bold title "Title" above two vertically-stacked enabled toggles labeled "Feature A" and "Feature B".

Switch Group with Title

UI5 Demo Kit

Switch

Visual Design

Switch (Horizon)

Resources

SAC Switch Collection