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.

Note

A bundle id is required if you'd like to use variables peristence.

variablesconfig
OBJECT

Optionally configure the variables for this UI.

variables
OBJECT

Variable key-value pairs, accessible via {var:} and automatically set as script environment variables unless overridden

iconpath
STRING

An optional icon for the dock when running this UI external from Alfred.

log
OBJECT

Configuration for the Alfred UI log.

debug
OBJECT

Configuration for UI debug modes.

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.

Tip

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

Note

The Alfred colour constants are US-spelt to match the macOS system colours.

pulse
OBJECT

Configuration for the UI Pulse.