/ client_code / Switch / form_template.yaml
form_template.yaml
 1  components:
 2  - event_bindings: {change: check_box_1_change}
 3    layout_properties: {slot: default}
 4    name: check_box_1
 5    properties: {align: left, background: '', bold: false, border: '', checked: true, enabled: true, font: '', font_size: null, foreground: '', italic: false, spacing_above: small, spacing_below: small, text: '', tooltip: '', underline: false, visible: true}
 6    type: CheckBox
 7  container:
 8    properties: {background: '', border: '', foreground: '', html: '', tooltip: '', visible: true}
 9    type: HtmlTemplate
10  custom_component: true
11  events:
12  - {default_event: true, description: when this switch is checked or unchecked, name: change}
13  - {description: when this switch is shown, name: show}
14  - {description: when this switch is hidden, name: hide}
15  is_package: true
16  properties:
17  - {allow_binding_writeback: true, default_binding_prop: true, default_value: false, important: true, name: checked, type: boolean}
18  - {default_value: null, group: appearance, important: false, name: checked_color, type: color}
19  - {default_value: true, group: interaction, important: true, name: enabled, type: boolean}
20  - {default_value: null, group: appearance, important: false, name: foreground, type: color}
21  - {default_value: null, group: appearance, important: false, name: background, type: color}
22  - {default_value: 14, group: text, important: false, name: font_size, type: number}
23  - {default_value: null, group: text, important: false, name: bold, type: boolean}
24  - {default_value: null, group: text, important: false, name: italic, type: boolean}
25  - {default_value: '', group: text, important: true, name: text_pre, type: string}
26  - {default_value: '', group: text, important: true, name: text_post, type: string}
27  - default_value: small
28    group: layout
29    important: false
30    name: spacing_above
31    options: [none, small, medium, large]
32    type: enum
33  - default_value: small
34    group: layout
35    important: false
36    name: spacing_below
37    options: [none, small, medium, large]
38    type: enum
39  - {default_value: '', group: tooltip, important: false, name: tooltip, type: string}
40  - {default_value: true, group: appearance, important: true, name: visible, type: boolean}
41  - {group: user data, important: false, name: tag, type: object}