Skip to content

Commit 3c8f1ca

Browse files
committed
..
1 parent 76d390a commit 3c8f1ca

File tree

5 files changed

+21
-28
lines changed

5 files changed

+21
-28
lines changed

website/docs/packages/reference/ui-module-instance.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# UI Module Instance
22

33

4-
When you add a UI Module from a package into your application, you create a UI Module Instance.
5-
6-
Each instance acts as a reusable, self-contained UI component that can be configured dynamically without modifying the internal structure of the module.
4+
When you add a UI Module from a package into your application, you create a UI Module Instance. Each instance acts as a reusable, self-contained UI component that can be configured dynamically without modifying the internal structure of the module.
75

86
You can create multiple instances of the same UI Module with different input values and settings.
9-
Instances are named sequentially (e.g., customerProfile1, customerProfile2) for easier identification.
7+
Instances are named sequentially (e.g., `customerProfile1`, `customerProfile2`) for easier identification.
108

119
This page provides information about the settings and properties available for configuring a UI Module Instance.
1210

1311

12+
<ZoomImage src="/img/uimod.drawio.png" alt="" caption="" />
1413

1514

1615

website/docs/packages/reference/ui-module.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
A UI Module is a reusable container that groups widgets, queries, and JavaScript logic into a single unit. It is created inside a UI Package and is designed for reuse across multiple applications.
44

5-
- You can add different types of widgets inside the module container. The entire container is rendered together when the module is used in an application.
6-
7-
- Widgets inside the module cannot be edited directly from the application. All configurations must be done through defined Inputs.
8-
9-
- UI Modules allow dynamic values to be passed from the application into the module using Inputs. Each module instance can receive different values based on application requirements.
5+
You can add different types of widgets inside the module container. The entire container is rendered together when the module is used in an application. Widgets inside the module cannot be edited directly from the application. All configurations must be done through defined Inputs.
106

117
This page provides information about the properties, content settings, and style configurations available for UI Modules.
128

@@ -18,6 +14,10 @@ Content properties control the functional behavior of the UI Module container an
1814

1915
<dd>
2016

17+
<ZoomImage src="/img/uimod.png" alt="" caption="" />
18+
19+
20+
2121
Inputs allow you to pass dynamic values from the application into the UI Module.
2222
They act as a bridge between the app and the widgets, queries, or JavaScript logic inside the module.
2323

@@ -110,7 +110,6 @@ Background Color is JavaScript configurable and can also be dynamically controll
110110

111111
Sets the color of the border around the UI Module container. Accepts a hex code, RGB value, or color name.
112112

113-
*Example:* If you want the container to have a grey border, set the Border Color to `#E0E0E0`.
114113

115114
</dd>
116115

@@ -122,7 +121,6 @@ Sets the color of the border around the UI Module container. Accepts a hex code,
122121
Sets the thickness of the border around the UI Module container.
123122
Default value is `1`.
124123

125-
*Example:* If you want a thicker border for emphasis, set the Border Width to `2`.
126124

127125
</dd>
128126

website/docs/packages/tutorial/ui-module.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# UI Module
22

3+
4+
A UI Module is a reusable, self-contained component built using widgets, queries, and JS Objects.
5+
It enables you to package visual elements, business logic, and data integrations into a module that can be easily reused across applications.
6+
37
In this tutorial, you will learn how to create a reusable UI Module that accepts dynamic inputs from an application.
4-
UI Modules can be built using widgets, private queries, and private JS Objects, enabling you to encapsulate visual elements, data fetching, and logic within a self-contained component.
58

69

710
:::tip What will I learn? 📝
8-
In this tutorial, you will create a reusable User Profile Card UI Module that displays basic user details dynamically.
11+
In this tutorial, you will create a reusable **User Profile Card** UI Module that displays basic user details dynamically.
912

1013
- 🔧 **Basics**: Learn how to create and configure a UI Module.
1114
- 🔄 **Dynamic Data**: Learn how to pass data from an application into the UI Module.
@@ -24,7 +27,7 @@ Before you start, make sure you have the following:
2427

2528

2629

27-
:::note
30+
:::info
2831
The ability to use query modules or JS modules directly inside UI Modules is not currently supported. This functionality will be available in a future release.
2932
:::
3033

@@ -43,15 +46,15 @@ The ability to use query modules or JS modules directly inside UI Modules is not
4346
</div>
4447

4548

46-
1. Open your workspace and click **Create New** in the top-right corner. Select Package and choose **UI Package** as the package type.
49+
1. Open your workspace and click **Create New** in the top-right corner. Select **Package** and choose **UI Package** as the package type.
4750

4851
<dd>
4952

5053
A UI Package is a collection of UI Modules that contain reusable widgets, queries, and JS Objects. These modules can be dynamically configured and reused across multiple applications within the same workspace.
5154

5255
</dd>
5356

54-
2. Click on the Module Container. The module container represents the overall layout for the UI Module, where you define inputs and configure widgets.
57+
2. Click on the **Module Container**. The module container represents the overall layout for the UI Module, where you define inputs and configure widgets.
5558

5659

5760
3. From the right-side property pane of the Module Container, you can configure **Inputs**.
@@ -60,7 +63,7 @@ A UI Package is a collection of UI Modules that contain reusable widgets, querie
6063
<dd>
6164

6265
Inputs allow you to dynamically set widget values inside the module.
63-
These values are passed from the application into the UI Module at
66+
These values are passed from the application into the UI Module at runtime.
6467

6568
Create the following inputs for the module:
6669

@@ -74,7 +77,7 @@ Create the following inputs for the module:
7477

7578
</dd>
7679

77-
4. Drag three Text widgets and one Image widget onto the canvas to create a simple user profile UI.
80+
4. Drag three **Text** widgets and one **Image** widget onto the canvas to create a simple user profile UI.
7881
These widgets will display user details such as the user's name, email, ID, and profile photo, using the input values passed from the application.
7982

8083
5. Once the widgets are added to the canvas, configure each widget to display values passed through the module’s inputs.
@@ -102,21 +105,16 @@ Set the widget properties as follows:
102105
6. Publish the UI Module from the top-right corner.
103106
This allows the module and its changes to reflect on the application side for reuse.
104107

105-
<dd>
106108

107-
If the package is git-connected, you also need to release a new version for the changes to be available. For more details, refer to [Package Version Control](/packages/reference/versioning).
108109

109-
</dd>
110-
111-
112-
7. Navigate back to the workspace homepage and create a new application.
110+
7. Navigate back to the workspace and create a new application.
113111

114112
8. Inside the application, click on the **UI** tab and select Add **New UI Element**. Click on **Module** to view all the UI Modules that are published within the same workspace.
115113

116114

117115
9. Drag the `UserProfileCard` module onto the canvas. This creates an instance of the UI Module that you can configure inside the application.
118116

119-
10. To pass dynamic data into the module, drag a Table widget onto the canvas.Click **Connect Data** and select the **Sample Users** datasource.
117+
10. To pass dynamic user data into the module, drag a Table widget onto the canvas. Click **Connect Data** and select the **Sample Users** datasource.
120118
Then, select the **public.users** table to connect the Table widget to sample user data.
121119

122120
11. Click on the `UserProfileCard` module instance added to the canvas.
@@ -137,9 +135,7 @@ Use the following bindings:
137135

138136
</dd>
139137

140-
:::tip
141-
🎉 Great Job!
142-
138+
:::tip 🎉 Great Job!
143139
You have successfully created a reusable UI Module that dynamically displays user details based on application data.
144140

145141
By using inputs, you can easily reuse this User Profile Card across different applications and pass parameters at runtime, without rebuilding the UI each time.
81.5 KB
Loading

website/static/img/uimod.png

73.7 KB
Loading

0 commit comments

Comments
 (0)