/toggle-switch

Use SVG to display a toggle switch

Primary Language4DMIT LicenseMIT

language language code-size license

A very simple widget to display a toggle button

macOS

light dark

Windows

light dark
  • Use a toggle button for binary operations that take effect as soon as the user changes the state of the button.

  • Think of the toggle button as an appliance's on/off button: You press it when you want to activate or deactivate the appliance's action.

  • To make the toggle button easy to understand, use labels containing one or two words, preferably names, that describe the functionality being controlled. For example, "WiFi" or "Kitchen lights".