The buttons component is used to display action buttons for a page or an individual block.
If there are no more than three buttons, they are displayed directly on the toolbar.
If there are more than three buttons, the additional buttons are automatically grouped into a dropdown menu.
| Property | Type | Description |
| type * | string | Button type. |
| settings * | object | Button settings. Depend on the button type. |
| required_permissions | array | Permissions required to display the button. |
The following parameters are available for all button types.
| Property | Type | Description |
| title * | string | Button label. |
| icon | string | Button icon. |
| background | string | Button background colour. Supported values: light and dark. |
Opens the specified page in the administration interface.
| Property | Type | Description |
| page * | string | Page to open. |
Example:
{
"type": "href",
"settings": {
"title": "Open profile",
"page": "users/profile"
}
}
Submits the current form to the API.
After a successful submission, the form may automatically navigate to the specified page.
| Property | Type | Description |
| href | string | Page to open after the form has been submitted successfully. |
Example:
{
"type": "submit",
"settings": {
"title": "Save",
"href": "users/list"
}
}
Executes an arbitrary API action.
Used to trigger custom business logic without opening a new page.
| Property | Type | Description |
| object * | string | API object. |
| action * | string | Action to execute. |
| data | object |
Request parameters. May contain variables from the current record.
Example variables: :id, :first_name, :company_id |
Before executing the request, the Frontend automatically replaces these variables with the corresponding values from the current record.
Example:
{
"title": "Cancel",
"background": "dark",
"object": "visits",
"action": "cancel",
"data": {
"id": ":id"
}
}
Opens a page in a modal window.
Used for nested forms, record selection, and other workflows that do not require navigation to a separate page.
| Property | Type | Description |
| page * | string | Page to open in the modal window. |
| insert_to_field | string | Field in the current form that will receive the identifier of the created record. |
| is_refresh_after_submit | boolean | Refresh the parent page after successful form submission. |
| is_close_after_submit | boolean | Close the modal window after successful form submission. |
| is_close_previous_modal | boolean | Close the parent modal window after successful submission of the nested form. |
| modal_size | string | Modal window size. |
| context | object | Context passed to the opened page. |
| Value | Description |
| sm | Small |
| md | Medium |
| lg | Large |
Context allows additional data to be passed to the opened page.
It is most commonly used to prefill form fields or indicate where the modal was opened from.
| Property | Type | Description |
| form * | string | Identifier of the form from which the modal was opened. |
| any property | mixed | Arbitrary parameters available on the opened page. |
{
"type": "modal",
"settings": {
"title": "Add client",
"page": "clients/add",
"insert_to_field": "clients_id",
"refresh_after_submit": false,
"close_after_submit": true,
"close_previous_modal": false,
"background": "dark"
}
}
{
"type": "modal",
"settings": {
"title": "Add contact",
"background": "dark",
"icon": "",
"page": "contacts/add",
"context": {
"form": "companies",
"row_id": ":id"
},
"insert_to_field": "contact_id"
}
}