# j-SwitchButton

> j-SwitchButton options: required, disabled, border, align, description

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 4e87cc115f80fd162a2ada96a27c713148d71963f35a4566cd183bdde8d67cc9
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

__Configuration__:

- `required {Boolean}` optional, enables "required" (default: `false`)
- `disabled {Boolean}` optional, disables this component
- `border {Boolean}` optional, allow border bottom (default: `false`)
- `align {String}` left/right alignment of the switch element (default: `left`)
- `description {String}` optional

Use it with `<ui-component name="switchbutton">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Tomáš Novák. Source: the Componentator components repository, MIT license.

```html example.html
<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>
```
