WebComponent for creating customisable boolean input elements.
true
: If present value is set to true (i.e. the right value is choosen)
The left option: false-opt
The right option: true-opt
Emits change
event when the value is changed.
--svg-color
: SVG fill color (eg. #000)
--button-radius
: Button border radius (eg. 1em)
--button-border
: Button border value (eg. 1px solid)
--button-gap
: Gap between left option, button and right option (eg. 0.5em)
--button-color
: Color of the button (eg. #000)
--button-background
: Background color of the button (eg. rgba(0, 0, 0, 0.1))
<input-boolean></input-boolean>
<input-boolean true></input-boolean>
<input-boolean>
<span slot="false-opt">False</span>
<span slot="true-opt">True</span>
</input-boolean>