Component basics
Last updated
Was this helpful?
Last updated
Was this helpful?
You can access all available components in the Components tab of the left side panel. To add any component to your app page, simply drag it from the sidebar and drop into your working area. You can also change the component's size by dragging the resize handlers.
When you select a component, you can configure its properties via the right side panel. Here, you can change component structure, adjust settings and styles. You can also remove the component altogether by clicking on the Bin icon.
Each component has its own triggers that can launch specific events - actions that you assign to them. You can find the Triggers section in the right side panel along with other component properties. There, you need to select the trigger you need from the dropdown and assign an action to it.
One of the basic examples here could be two dependent Select components where the values available in the second dropdown depend on the value selected in the first one.
In our example below, we have two dropdowns (Make and Model), and based on the car make selected in the first dropdown, available car models are displayed in the second one. To achieve this, we created a JavaScript Code step and assigned it to the parent Select's (Make dropdown) On Change trigger:
Once you select the car make in the first dropdown, it will filter only its specific models in the second dropdown.
Here, in component properties, you can also see where a specific component is used - whether it’s in other components or actions. The icon will show you if there're any usages at all - you don't have to click it. Usages are grouped by target, with the following path format: name → property
.
If you click on a specific property or path in the Usages, you will be taken to the corresponding component or action, and you'll be able to make any adjustments if needed.
To connect your data to such components as Table, Chart, List View, and Grid View, you simply need to select the necessary action or variable in the component's Data field dropdown. The dropdown shows all available actions and variables - Suggested, Page, and App - and you can easily switch between them. The component structure is automatically regenerated based on your selection. If you need to undo the changes, you can revert component structure to its previous state by clicking Undo in the toast that appears at the top or clicking the Revert button next to component structure.
To connect your data to all other components, you need to manually reference the necessary action or component property in the component's Data field. Similarly, you can also change component data by removing the previously connected data and selecting new one. Once selected, you can auto-sync the new action's structure by clicking the Generate structure button. Thus, you won't have to build new component structure from scratch.
Component name is generated automatically when you assign an action to it. Name generation is based on the following rules:
If an action has a resource, for example a Table, then the component name is based on the Table name. For example, Load Users action -> usersTable.
If there is no resource, then the component name is based on the action name. For example, JavaScript Code step called loadUsersData -> usersDataTable.
Such components as Input, Date picker, File picker, and complex components like Form and Table can produce values. When you enter something into an input, select a row in a table or submit a form, you can use component values as variables.
Such variables are available under {{ui.componentName.*}}
.
You can simply type {{ui.
in any code or text field in the component or action settings to see a list of all available variables.
Simple components, such as Input and Date picker, have a value property. It's a reference to the current component value:
In a Form component, the value key will be a reference to the whole Form object. The keys represent the Form input names and values:
A Table component has multiple keys, such as selectedRow
, editedRow
, newRow
and deletedRow
with the following inners properties:
UI Bakery allows hiding components by configuring their Show condition as false
.
The Show condition value is determined based on truth evaluation. For example, you can use the state of one component to control the visibility of another component.
Let's say you have a Table component added to your working area and you want to control its visibility with the help of a Checkbox:
Add a Checkbox component to your canvas.
Next, select the Table and set its Show condition as {{ui.checkbox.value}}
.
Test it out - select and clear the checkbox to either show/hide your Table component.
Learn more about controlling component visibility