Button
Displays a tappable button to perform an action.
Key | Type | Description | Required | Default | Min Version |
---|---|---|---|---|---|
action | string | Action identifier | * | – | – |
args | dictionary | Arguments passed to the action | * | – | – |
alignment | string | Text alignment | – | Left | 1.2-10 |
alignment | Description |
---|---|
Left | Left aligned |
Center | Centered |
Right | Right aligned |
Natural | Natural |
Justified | Justified |
Action Notes
When finished, an action may save its return value to this component’s preference pair; set key
and defaults
properly.
Different action
require different args
.
Reload:
Reload all running XUI instances. Requires XXT v1.2-10+.
No parameters, no return value.
RunCommand:
Execute a shell command via system
/posix_spawn
. Requires XXT v1.2-10+.
Key | Type | Description | Required | Default | Min Version |
---|---|---|---|---|---|
command | string | Command line to execute | * | – | 1.2-10 |
Return Type | Description |
---|---|
integer | Exit status |
LaunchScript:
Run a service script.
Key | Type | Description | Required | Default | Min Version |
---|---|---|---|---|---|
path | string | Service script path | * | – | – |
No return value.
OpenURL:
Open a URL in a third-party app.
Key | Type | Description | Required | Default | Min Version |
---|---|---|---|---|---|
url | string | URL to open | * | – | – |
No return value.
ScanQRCode:
Invoke camera to scan QR code.
No parameters.
Return Type | Description |
---|---|
string | Scan result |
SendMail:
Compose and send an email in-app.
Key | Type | Description | Required | Default | Min Version |
---|---|---|---|---|---|
subject | string | Subject | * | – | – |
toRecipients | array of string | To recipients | * | – | – |
ccRecipients | array of string | CC recipients | – | – | |
bccRecipients | array of string | BCC recipients | – | – | |
attachments | array of string | Attachment file paths | – | – |
No return value.
Null:
No operation. Usually used to reset a specific preference and notify scripts. Requires XXT v1.2-10+.
No parameters, no return value.
Example
{
cell = "Button";
action = "OpenURL:";
label = "Contact [email protected]";
args = {
url = "mailto://[email protected]";
}
};