UXP Manifest v4
The plugin's manifest is where you include metadata about your plugin. Simply put, the manifest is a list of facts about your plugin in the form of a JSON object. No executable code goes into your manifest.
The manifest is located in your plugin's root folder and must be named manifest.json.
If you are a bit rusty at reading JSON, here's a good reference.
UXP 6.0 has introduced manifest v5.
Example manifest (v4)
{
"manifestVersion": 4,
"id": "YOUR_ID_HERE",
"name": "Name of your plugin",
"version": "1.0.0",
"main": "index.html",
"host": {
"app": "PS",
"minVersion": "23.0.0"
},
"entrypoints": [
{
"type": "command",
"id": "commandFn",
"label": {
"default": "Show A Dialog"
}
},
{
"type": "panel",
"id": "panelName",
"label": {
"default": "Panel Name"
},
"minimumSize": {"width": 230, "height": 200},
"maximumSize": {"width": 2000, "height": 2000},
"preferredDockedSize": {"width": 230, "height": 300},
"preferredFloatingSize": {"width": 230, "height": 300},
"icons": [
{"width":23,"height":23,"path":"icons/dark.png","scale":[1,2],"theme":["darkest","dark","medium"]},
{"width":23,"height":23,"path":"icons/light.png","scale":[1,2],"theme":["lightest","light"]}
]
}
],
"icons": [
{ "width": 23, "height": 23, "path": "icons/icon_D.png", "scale": [ 1, 2 ], "theme": [ "dark", "darkest" ], "species": [ "generic" ] },
{ "width": 23, "height": 23, "path": "icons/icon_N.png", "scale": [ 1, 2 ], "theme": [ "lightest", "light" ], "species": [ "generic" ] }
]
}
See the sections below to learn more about each key/value field. All fields are required unless otherwise noted below.
Top-level metadata
The top level of the manifest JSON object contains high-level information about your plugin.
Here are the definitions of the keywords in the "Required" column:
- Develop - required field for the plugin to be loaded.
- Publish - required field for plugins to be submitted in the Adobe Developer Console and published in the Plugin Manager.
manifestVersionnumber4 or higher.idstringnamestringversionstringx.y.z format. Version must be three segments and each version component must be between 0 and 99.mainstringmain.js)iconsIconDefinition[]hostHostDefinition|HostDefinition[]entrypointsEntryPointDefinition[]Icons
Icons are not required during development, but must be provided when distributing through the Plugin Marketplace. The icons field is an array of a IconDefinitions.
IconDefinition
widthnumberheightnumberpathstringscalenumber[][1, 2] means that there is a @1x and @2x version of the icon specified at the path. (Densities other than 1x can be specified by adding @2x before the icon's extension)themestring[]lightest, light, dark, and darkest. If all themes are compatible with the icon, you can use all. (Default is all).speciesstring[]generic, meaning that Photoshop is free to use this icon anywhere.Host
The host field is an object matching the HostDefinition format specified below. This entry allows your plugin to specify which app your plugin can run on such as Adobe XD or Photoshop. During development, the field can contain an array of HostDefinition's. This can be very convient during development of cross-compatible UXP plugins. However, during submission to the marketplace, only one HostDefinition is allowed.
HostDefinition
appstring"XD" and "PS").minVersionstringx.y format) that can run this plugin. The lowest valid version for manifest V4 plugins is version 22.0. Note: The version number must be at least two segments. Typically, you'll leave the minor segment set to 0, e.g. 22.0.maxVersionstringhost.minVersion.Entry Points
The entrypoints field is an array of objects matching the EntryPointDefinition format specified below. These entries appear both in the Plugins menu in the native menubar, and the plugin panel.
Each entry point specifies a type, to create either a direct-action command or a panel show/hide command.
EntryPointDefinition
typestring"command" or "panel".idstringid will also be mapped to entrypoints defined in your plugin code.labelstringshortcutObjectcommand entry points.minimumSizeObjectpanel entry points. Object defining the preferred minimum size of the panel. This object is of the form {width: number, height: number} where each length is in pixel units. The host app may not guarantee the minimum width depending upon context.maximumSizeObjectpanel entry points. Object defining the preferred maximum size of the panel. This object is of the form {width: number, height: number} where each length is in pixel units. The host app may not guarantee the maximum width depending upon context.preferredDockedSizeObjectpanel entry points. Object defining the preferred size of the panel when docked. This object is of the form {width: number, height: number} where each length is in pixel units. This setting is a preference, and may not be honored.preferredFloatingSizeObjectpanel entry points. Object defining the preferred size of the panel when floating. This object is of the form {width: number, height: number} where each length is in pixel units. This setting is a preference, and may not be honored.iconsarray<object>Keyboard shortcuts
Shortcuts are not yet available for plugins.
Menu Localization
Plugin menu item labels or panel labels can be localized to match the host's current UI language setting. Other manifest fields such as name cannot be localized yet. Localized labels are represented as an object containing multiple translations, instead of a single string value:
"label": {
"default": "Menu Label",
"fr": "Etiquette de Menu",
"de": "Menübezeichnung"
}
A default string is always required.
Inheritance and Overrides
Certain top-level fields can be overridden deeper in the manifest.
iconscan be overridden for each panel's entry point.