Skip to content

Commit 2d14e48

Browse files
committed
2 parents 4d8ce0a + 7177ecc commit 2d14e48

7 files changed

Lines changed: 126 additions & 97 deletions

File tree

README.md

Lines changed: 41 additions & 31 deletions
Large diffs are not rendered by default.

pages/apis/api-overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The basic flow is:
1212
- [Handle errors](api-on-error)
1313

1414
<Callout emoji="💡">
15-
During develoment, you can [mock APIs within Ensemble](use-mock-api-response).
15+
During development, you can [mock APIs within Ensemble](use-mock-api-response).
1616
</Callout>
1717

1818

pages/deploy/1-prepare-app.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
11
# Preparing your App for deployment
22

3-
Once you have built your UI with Ensemble and used it to build your app and are ready to take it to production, follow these instructions to deploy it to any iOS or Android devices, or to submit it to the Apple AppStore or Google Play Store.
3+
Once you have built your UI with Ensemble and used it to build your app and are ready to take it to production, follow these instructions to deploy it to any iOS or Android devices, or to submit it to the Apple App Store or Google Play Store.
44

55
### Prerequisites
6-
* Your Ensemble App ID. From [Ensemble Studio](https://studio.ensembleui.com), go to your App's Settings screen to retrieve the App ID.
6+
7+
- Your Ensemble App ID. From [Ensemble Studio](https://studio.ensembleui.com), go to your App's Settings screen to retrieve the App ID.
78

89
### Download Ensemble Starter
9-
Ensemble Starter is our packaging solution, enabling you to connect to your Ensemble UI and package it.
10-
* Clone the Starter App `git clone https://github.com/EnsembleUI/starter my_first_app` into the folder *my_first_app*. You may change the name, but don't use camelCase (e.g. myFirstApp) or dash (-) as the separators.
11-
* Follow the README in this repo.
10+
11+
Ensemble Starter is our packaging solution, enabling you to connect to your Ensemble UI and package it.
12+
13+
- Clone the Starter App `git clone https://github.com/EnsembleUI/starter my_first_app` into the folder _my_first_app_. You may change the name, but don't use camelCase (e.g. myFirstApp) or dash (-) as the separators.
14+
- Follow the README in this repo.
1215

1316
### Requesting permissions from your end-users
17+
1418
If your app requires capabilities like location, camera, ..., you will need to enter a reason per capability. These reasons will be prompted to the end users, who can decide whether to grant or deny your requests.
15-
* For iOS, edit `<my_first_app>/ios/Runner/Info.plist` and add the below permissions as the direct children of the `<dict>` tag.
16-
* For Android, edit `<my_first_app>/android/app/src/main/AndroidManifest.xml` and add the below permissions as the direct children of the `<manifest>` tag.
19+
20+
- For iOS, edit `<my_first_app>/ios/Runner/Info.plist` and add the below permissions as the direct children of the `<dict>` tag.
21+
- For Android, edit `<my_first_app>/android/app/src/main/AndroidManifest.xml` and add the below permissions as the direct children of the `<manifest>` tag.
1722

1823
Below are the snippet per capability to insert for iOS and Android respectively.
1924

2025
**Location**
26+
2127
```xml
2228
<key>NSLocationWhenInUseUsageDescription</key>
2329
<string>e.g. This app needs access to your location to ....</string>
2430
```
2531

2632
**Camera**
33+
2734
```xml
2835
<key>NSCameraUsageDescription</key>
2936
<string>e.g. your reason for requesting camera access</string>
3037

3138
<key>NSMicrophoneUsageDescription</key>
3239
<string>e.g. your reason for requesting microphone access</string>
3340
```
34-
35-

pages/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44

55
Ensemble is a platform where you can build, publish, and iterate native and web apps without leaving your browser.
66

7-
With Ensemble, you create apps by defining them using a declarative language. Think of it as configuring your app, instead of coding it. Ensemble apps are rendered at runtime by interpreting this declerative definition. This architecture means that:
7+
With Ensemble, you create apps by defining them using a declarative language. Think of it as configuring your app, instead of coding it. Ensemble apps are rendered at runtime by interpreting this declarative definition. This architecture means that:
88

99
1. Ensemble apps are native to each platform: iOS, Android, and web.
1010
2. Ensemble apps can be updated instantly because the app definitions are pushed to clients. You can use Ensemble's cloud service, or use your own server.
11-
3. Ensemble apps always leverage the latest front-end technologies (Flutter for iOS and Android, React for web) so that you don't have to worry about tech-debt incured by using these technologies.
11+
3. Ensemble apps always leverage the latest front-end technologies (Flutter for iOS and Android, React for web) so that you don't have to worry about tech-debt incurred by using these technologies.
1212

1313
![architecture](/images/architecture.png)
1414

1515
## How do I build my app?
1616

17-
Ensemble provides a browser-based IDE, [Ensemble Studio](https://studio.ensembleui.com), where you can build, test, and publish your apps all from the browser. You can instantly preview your Ensemble apps on iOS and Anrdoid devices using [Ensemble preview app](/test/preview-app). Once ready to publish, Ensemble automatically push your apps to Apple AppStore and Google PlayStore. For web, you can download a web build and host it on any service.
17+
Ensemble provides a browser-based IDE, [Ensemble Studio](https://studio.ensembleui.com), where you can build, test, and publish your apps all from the browser. You can instantly preview your Ensemble apps on iOS and Android devices using [Ensemble preview app](/test/preview-app). Once ready to publish, Ensemble automatically pushes your apps to Apple App Store and Google Play Store. For web, you can download a web build and host it on any service.
1818

1919
## Need help?
2020

2121
[Chat with us on Discord](https://discord.gg/cEHkJTmn75)
2222

2323
[Join our office hours](https://discord.gg/eJrUWhnRHS?event=1218554330765066310)
2424

25-
[Drop us an email](mailto:hello@ensembleui.com)
25+
[Drop us an email](mailto:hello@ensembleui.com)

pages/widgets/switch.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +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 |
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) |
2732

2833
### styles
2934

@@ -32,7 +37,7 @@ The Switch Widget enables the rendering of switch toggle elements, providing use
3237
| variant | string | Select a pre-defined look and feel for this Input widget. This property can be defined in the theme to apply to all Input widgets. [see properties](#options-for-stylesvariant) |
3338
| visible | boolean | Toggle a widget visibility on/off. Note that an invisible widget will not occupy UI space, unless the visibilityTransitionDuration is specified. |
3439
| visibilityTransitionDuration | number | Specify the duration in seconds when a widget animates between visible and not visible state. Note that setting this value will cause the widget to still occupy the UI space even when it is not visible. |
35-
| opacity | double | Adjusts the opacity of the widget. Values range from 0 (fully transparent) to 1 (opaque). Default is `1`. |
40+
| opacity | double | Adjusts the opacity of the widget. Values range from 0 (fully transparent) to 1 (opaque). Default is `1`. |
3641
| stackPositionTop | integer | The distance of the child's top edge from the top of the stack. This is applicable only for Stack's children. |
3742
| stackPositionBottom | integer | The distance that the child's bottom edge from the bottom of the stack. This is applicable only for Stack's children. |
3843
| stackPositionLeft | integer | The distance that the child's left edge from the left of the stack. This is applicable only for Stack's children. |
@@ -52,7 +57,6 @@ The Switch Widget enables the rendering of switch toggle elements, providing use
5257
| 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. |
5358
| 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` |
5459
| borderWidth | integer | Thickness of the border. Minimum value should be 0. |
55-
| 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) |
5660

5761
### icon
5862

0 commit comments

Comments
 (0)