Panels and Commands

Learn the fundamental differences between the two types of UXP plugin components and when to use each.

Overview

A UXP plugin is a self-contained application hosted inside a UXP-enabled application, such as Photoshop, InDesign, Premiere, or Media Encoder. Every plugin is built using one or both of two component types: Panels and Commands. Understanding the differences between these components is essential for designing plugins that fit naturally into users' workflows.

Think of it this way: Commands are actions, while Panels are workspaces.

Commands

Commands are menu items that execute code when clicked, designed for discrete tasks that don't require a persistent interface.

Premiere: nested under Window > UXP Plugins. Other hosts surface Commands in their own plugins menu.

UXP Plugins menu

Characteristics of Commands

When to Use Commands

Choose Commands when you need to:

Panels

Panels are persistent user interfaces that users can dock into the host application's workspace alongside its built-in panels. They remain open and interactive throughout the work session.

For example: Premiere's Timeline and Effect Controls, or Photoshop's Layers panel.

To dock a panel, drag it from the title bar (not the window frame bar) until the docking overlay appears:

Panel docking

Characteristics of Panels

When to Use Panels

Choose Panels when you need to:

Both Commands and Panels can display modal dialogs: temporary windows that block interaction with the host application until dismissed. Modal dialogs are perfect for:

data-variant=info
data-slots=heading, text
Modal Dialogs
Modal dialogs are blocking by design: users cannot interact with the host application until the dialog is closed. This makes them ideal for critical decisions or required input, but use them sparingly to avoid disrupting workflows.

Commands with Modal Dialogs

Commands often use modal dialogs as their primary interface. Since Commands don't have a persistent UI, a modal dialog provides the necessary input mechanism. For example:

Commands with Modal Dialogs

Panels with Modal Dialogs

Panels use modal dialogs for secondary interactions that require focused attention. The panel provides the main interface, while modal dialogs handle specific tasks. For example:

Panels with Modal Dialogs

Key Differences

Here's a quick comparison to help you choose:

Aspect
Commands
Panels
UI Presence
No persistent UI (optional modal only)
Persistent, dockable UI
User Interaction
Blocking (if modal dialog is shown)
Non-blocking
Lifecycle
Execute and complete
Remain open with lifecycle hooks
Best For
One-time actions, automation
Ongoing interaction, complex workflows
Complexity
Lightweight, focused tasks
Rich interfaces with multiple controls

Combining Commands and Panels

A single plugin can include multiple Commands, multiple Panels, or both. This flexibility lets you design plugins that match user needs:

All Commands and Panels from the same plugin appear grouped under that plugin's own entry in the host's plugins menu (in Premiere, under Window > UXP Plugins).

Implementation

For the practical details of declaring and wiring up Panels and Commands in your manifest.json and code, see the Entrypoints Guide.