j-SwitchButton
Konfigurácia:
required {Boolean}voliteľné, umožňuje "povinné" (predvolené:false)disabled {Boolean}voliteľné, deaktivuje tento komponentborder {Boolean}voliteľné, povoliť spodný okraj (predvolené:false)align {String}ľavé/pravé zarovnanie spínacieho prvku (predvolené:left)description {String}voliteľné
Použite ho so <ui-component name="switchbutton">. Keď komponent ešte nie je načítaný, jComponent ho stiahne pri prvom použití z adresy v DEF.fallback (predvolene CDN Componentator). Autor: Tomáš Novák. Zdroj: úložisko komponentov Componentator, licencia MIT.
<div style="width:500px">
<ui-component name="switchbutton" path="form.newsletter" config="description:Product updates;border:1">Receive messages from our platform</ui-component>
<ui-component name="switchbutton" path="form.terms" config="description:Promotions and tips;border:1">Receive coupons, promotions, surveys</ui-component>
<ui-component name="switchbutton" path="form.marketing" config="description:Marketing information;required:1;align:right;border:1">Receive marketing somarines</ui-component>
<ui-component name="switchbutton" path="form.disabled" config="description:Acceptance of 2023;disabled:1;align:right">Documents are not ready</ui-component>
</div>
<script>
var form = {};
form.newsletter = true;
</script>