Web toggle/switch buttons are scarce, mainly repeating each other, with minor code nuances.Let's have a simple switch without large frameworks invocation. No component structure, single web coding - html/css/js - the developers like it.
The CSS part (put it in a < head >< style > tag on the HTML page, or keep it in an external file referenced with < link rel="stylesheet" href=.../>)
And now the HTML part. Your case settings would be applied here - see the hints later on.
Custom settings (in the HTML part):
Consuming the selected value:
Go switch it!