Toggle button.
Turns a persistent mode or selection on and off.
See it in context
What it is
A toggle button has a pressed state that remains after activation. Formatting tools such as Bold use this pattern to show whether a mode applies to the current selection.
When to use it
Keep the label stable and expose the current pressed state.
Know the difference
An ordinary button performs a momentary action; a toggle button retains an on or off state.
Across platforms
Web · Windows · Linux
Expose checked, mixed, or pressed state using the corresponding native control or accessibility semantics. Space normally changes the focused control.
iOS · iPadOS · Android · macOS
Use the native selection control appropriate to immediate settings or form choices. A switch and a checkmark can express different interaction models.
watchOS · Wear OS
On a watch, use a short label and a generous target within the small display. Crown or rotary input can supplement touch for adjustable values.
tvOS · Android TV
On TV, give the focused control a prominent visual state and support remote activation; hover and precise pointer targeting are not assumed.
visionOS
In spatial interfaces, use a comfortably targetable control with a clear focus response for indirect gaze-and-pinch interaction.
Go to the source
Primary documentation for the pattern and its platform conventions.