ui.json
The top-level Alfred UI file is named ui.json, this is where you define the JSON for your Alfred UI.
Properties
- bundleid
- STRING
- Recommended
The bundle id for this instance of Alfred UI.
NoteA bundle id is required if you'd like to use variables peristence.
- variables
- OBJECT
Variable key-value pairs, accessible via {var:} and automatically set as script environment variables unless overridden
- templates
- OBJECT
An object of template objects by name, for use with the template component type.
This object will be checked before attempting to load the template from a file.
TipTemplates are a way to make reusable components.
- colours
- OBJECT
Key value pairs of name to COLOUR which are subsequently available as colour constants throughout the UI json.
"colours": {
"bananarama": "#FFE135"
}
There are some pre-defined colour constants from the Alfred theme, these are alfredSelectedResultTextColor and alfredSelectedResultBackgroundColor, we recommend using these if you would like to make your UI feel Alfred-native.
NoteThe Alfred colour constants are US-spelt to match the macOS system colours.