Shared Properties
Each component shares the following properties:
- type
- ENUM
- Default:
"view"
The type of the component you would like to use.
The available types are documented on the Components page.
- id
- STRING
- Unique
The identifier of a component which can be referenced later in action arguments using {value:id.property}, or when updating or replacing UI components by id.
ImportantTo prevent confusion, ensure that
idis kept globally unique throughout your UI.
NoteThe special
"file"type component which refers to other files can have anidset on it, but this can be overriden by anidin the file you refer to.
- focus
- BOOL
- Set on a single component
Sets this component to be intially focused when the JSON is parsed.
- enabled
- BOOL
- Default:
true
When enabled is set to false, the component will be disabled and won't accept user input.
- shortcut
- STRING
- Only supported by certain actionable components
The keyboard shortcut to directly trigger the action of this component.
e.g. For a Save button, you could set "⌘S" to make the key combo ⌘S trigger the configured "actioned" event for that button.
TipUse the following modifier characters to composite your shortcut string: ⌘ ⇧ ⌃ ⌥ ↩︎
NoteThis property sets the AppKit keyEquivalent directly on actionable components, including
buttons,checkboxesandpickers.This is different to the
shortcutsproperty on theviewcomponent, which is a way of assigning an ARRAY of actions to keyboard shortcuts.
- accessibility
- OBJECT
Add additional accessibility properties to a UI component.
NotePlease make your workflows accessible where possible.