Switch demo

This example uses a standard checkbox with the HTML switch attribute, JavaScript feature detection, and a conditionally loaded polyfill for browsers lacking native support.

Preferences