Skip to content

Commit ecb6de0

Browse files
committed
updated the switch docs
1 parent 68ad050 commit ecb6de0

1 file changed

Lines changed: 23 additions & 28 deletions

File tree

pages/widgets/switch.md

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,29 @@ The Switch Widget enables the rendering of switch toggle elements, providing use
66

77
## Properties
88

9-
| Property | Type | Description |
10-
| :------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11-
| id | string | ID to be referenced later |
12-
| maxWidth | integer | The max width of this Input widget (default 700). while min vlaue can be `0` and maximum can be `5000` |
13-
| label | string | Label for your widget |
14-
| labelHint | string | Hint text on your label |
15-
| hintText | string | Hint text explaining your widget |
16-
| required | boolean | Whether the field is required |
17-
| enabled | boolean | Enables or disables the interactivity and input functionality of the widget |
18-
| icon | object | [See properties](#icon) |
19-
| onChange | action | Call Ensemble's built-in functions or execute code when the input changes. Note for free-form text input, this event only dispatches if the text changes AND the focus is lost (e.g. clicking on button) |
20-
| onChangeHaptic | enum | The type of haptic to perform when switch state is changed. It should be one of heavyImpact, mediumImpact, lightImpact, selectionClick, and vibrate |
21-
| value | string | Specifying the value of your Text Input |
22-
| autoComplete | boolean | Enable the Input search suggestion option |
23-
| items | array | List of values, or Objects with value/label pairs |
24-
| styles | object | [see properties](#styles) |
25-
| leadingText | string | Sets the text displayed before the checkbox |
26-
| trailingText | string | Sets the text displayed after the checkbox |
27-
28-
| value | boolean | The current state of the switch. `true` for on, `false` for off |
29-
| leadingText | string | Sets the text displayed before the switch |
30-
| trailingText | string | Sets the text displayed after the switch |
31-
| activeColor | color | The color of the switch track when it is in the active/on state, starting with '0xFF' for full opacity. |
32-
| inactiveColor | color | The color of the switch track when it is in the inactive/off state, starting with '0xFF' for full opacity.|
33-
| activeThumbColor | color | The color of the switch thumb when it is in the active/on state, starting with '0xFF' for full opacity. |
34-
| inactiveThumbColor | color | The color of the switch thumb when it is in the inactive/off state, starting with '0xFF' for full opacity. |
35-
| useIOSStyle | boolean | If true, renders the switch using iOS-style appearance (CupertinoSwitch). When false, uses Material style (default) |
9+
| Property | Type | Description |
10+
| :----------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11+
| id | string | ID to be referenced later |
12+
| maxWidth | integer | The max width of this Input widget (default 700). while min value can be `0` and maximum can be `5000` |
13+
| label | string | Label for your widget |
14+
| labelHint | string | Hint text on your label |
15+
| hintText | string | Hint text explaining your widget |
16+
| required | boolean | Whether the field is required |
17+
| enabled | boolean | Enables or disables the interactivity and input functionality of the widget |
18+
| icon | object | [See properties](#icon) |
19+
| onChange | action | Call Ensemble's built-in functions or execute code when the switch value changes |
20+
| onChangeHaptic | enum | The type of haptic to perform when switch state is changed. It should be one of heavyImpact, mediumImpact, lightImpact, selectionClick, and vibrate |
21+
| value | boolean | The current state of the switch. `true` for on, `false` for off |
22+
| autoComplete | boolean | Enable the Input search suggestion option |
23+
| items | array | List of values, or Objects with value/label pairs |
24+
| styles | object | [see properties](#styles) |
25+
| leadingText | string | Sets the text displayed before the switch |
26+
| trailingText | string | Sets the text displayed after the switch |
27+
| activeColor | color | The color of the switch track when it is in the active/on state, starting with '0xFF' for full opacity. |
28+
| inactiveColor | color | The color of the switch track when it is in the inactive/off state, starting with '0xFF' for full opacity.|
29+
| activeThumbColor | color | The color of the switch thumb when it is in the active/on state, starting with '0xFF' for full opacity. |
30+
| inactiveThumbColor | color | The color of the switch thumb when it is in the inactive/off state, starting with '0xFF' for full opacity.|
31+
| useIOSStyle | boolean | If true, renders the switch using iOS-style appearance (CupertinoSwitch). When false, uses Material style (default) |
3632

3733
### styles
3834

@@ -61,7 +57,6 @@ The Switch Widget enables the rendering of switch toggle elements, providing use
6157
| borderRadius | string or integer | The border radius of the widget.This can be specified using CSS-like notation with 1 to 4 integers. Minimum value: 0. |
6258
| borderColor | integer or string | Sets the border color, starting with '0xFF' for full opacity. `transparent` `black` `blue` `white` `red` `grey` `teal` `amber` `pink` `purple` `yellow` `green` `brown` `cyan` `indigo` `lime` `orange` |
6359
| borderWidth | integer | Thickness of the border. Minimum value should be 0. |
64-
| expanded | boolean | If the parent is a Row or Column, this flag will stretch this widget in the appropriate direction. (e.g stretch horizontally for parent of type Row) |
6560

6661
### icon
6762

0 commit comments

Comments
 (0)