Skip to main content

Button

Displays a tappable button to perform an action.

KeyTypeDescriptionRequiredDefaultMin Version
actionstringAction identifier*
argsdictionaryArguments passed to the action*
alignmentstringText alignmentLeft1.2-10
alignmentDescription
LeftLeft aligned
CenterCentered
RightRight aligned
NaturalNatural
JustifiedJustified

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+.

KeyTypeDescriptionRequiredDefaultMin Version
commandstringCommand line to execute*1.2-10
Return TypeDescription
integerExit status

LaunchScript:

Run a service script.

KeyTypeDescriptionRequiredDefaultMin Version
pathstringService script path*

No return value.

OpenURL:

Open a URL in a third-party app.

KeyTypeDescriptionRequiredDefaultMin Version
urlstringURL to open*

No return value.

ScanQRCode:

Invoke camera to scan QR code.

No parameters.

Return TypeDescription
stringScan result

SendMail:

Compose and send an email in-app.

KeyTypeDescriptionRequiredDefaultMin Version
subjectstringSubject*
toRecipientsarray of stringTo recipients*
ccRecipientsarray of stringCC recipients
bccRecipientsarray of stringBCC recipients
attachmentsarray of stringAttachment 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]";
}
};

XUI-Button.png