Properties
Each property throughout Alfred UI's ui.json has a primitive or complex type.
NoteSome properties are getters, which means you can get the values of these properties in actions using the
{value:}placeholder.Properties which are also getters will be annotated throughout the documentation.
Primitive types
STRING
Simple text.
e.g. the text on a label.
"text": "Hello World!"The text on the label will be set to "Hello World!".
BOOL
Simple true or false.
e.g. the state of a checkbox
"checked": trueThe checkbox will be ticked.
INTEGER
Integers are whole numbers, usually ranged and with a default value.
Integer properties will be capped to their range. If the range is 0-64 and you set a value of 80, this will be capped to 64.
e.g. the padding for a view.
"padding": 8This will set a padding of 8px around the layout in a view.
DOUBLE
Decimal numbers, usually ranged and with a default value.
Double properties will be capped to their range. If the range is 0.0-1.0 and you set a value of 2.0, this will be capped to 1.0.
e.g. The transparency of a view
"alpha": 0.5This will set the view to be faded out, or 50% transparency.
ARRAY
An array of items. Each array property will document the expected type.
e.g. The components for a view
"components": [ {...}, {...} ]
ENUM
Enums are a collection of specific values which may set a specific behaviour, or mode.
"fit" "fill" "stretch" "centre"
In each case, the available and default enum value will be documented.
e.g. The resizing mode of an image in an Image View
"resize": "fit"The resizing mode for the image will be set to "fit"
null
Some properties allow their value to be set to null along with their specific type. This will reset to use the default value. Any more specific behaviour will be documented alongside the property.
e.g. Removing an image.
"image": nullThis will remove the image from an Image View.
Alfred UI types
Alfred UI uses a number of custom OBJECT types each with their own properties.