Adding toggle switches (HTML)

[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]

Use Toggle switches to present users with exactly two mutually exclusive options (like on/off), where choosing an option results in an immediate commit. A toggle switch should have a single label.

The toggle switch mimics a physical switch that allows users to turn on or off things. The control has two fixed states: "ON" or "OFF".

Toggle controls

Users can slide or tap to change its states. When users slide their finger past the snap point, the toggle switches states.

Snap points of a Toggle control