You can use this switch component to display on and off content, such as for settings or simple controls. By changing the aria-checked attribute from true or false will animate the switch on/off.

View example of the switch pattern


For more information view the switch design spec, which includes the specification in markdown format and a PNG image.