| UI or UX | UI + UX - Location-invoked contextual command menu | UI + UX - Contextual command list for a resource or selection | UI + UX - Button-controlled popup menu of actions or links | UI + UX - Small anchored contextual overlay |
| UI guidance | Render a context menu as a compact command menu anchored to the object, selection, pointer position, or focused item that invoked it, with clear item labels, disabled reasons, separators, and destructive separation. | Render a compact menu of verb-led actions scoped to one resource, row, card, selected set, or page object, with clear section headings, object-aware labels, disabled reasons, and separated dangerous commands. | Render a named button trigger, visible opened state, controlled popup, menu items, active item styling, disabled item state, separator or section grouping, and a safe way to distinguish destructive commands. | Render a popover as a compact surface visually tied to the trigger, field, selection, or object that opened it, with a clear title or labelled content when the body is more than a short sentence. |
| UX guidance | Use a context menu when users need fast object-specific commands from a secondary invocation path such as right click, long press, context-menu key, or Shift+F10. | Make the current object or selection count explicit, update actions when scope changes, and route destructive or privacy-sensitive commands into confirmation, undo, restore, or review instead of running silently. | Make dismissal, activation, focus return, unavailable actions, and high-risk command handoff predictable so the menu behaves like a command chooser rather than a hidden form. | Make opening, light dismissal, Escape, outside click, anchor scrolling, focus order, and focus return predictable so the surface feels contextual rather than interruptive. |
| Good UI | A file row opens a context menu at the selected row with Open, Rename, Duplicate, Download, Archive, and Delete separated at the end. | A Customer actions menu has Manage customer, Data requests, and Account risk sections, with Edit customer, Merge customer, Request data export, and Delete customer separated at the end. | A table row has a Report actions button that opens a compact menu with Open, Rename, Duplicate, Archive, and an unavailable Export item. | A Due date button in a task row opens a small popover beside the field with Today, Tomorrow, Friday, a custom date field, and a visible close control. |
| Bad UI | Right clicking a row opens a menu beside the toolbar and still shows actions for the previously selected row. | Safe, risky, disabled, external, and value-selection items share the same style and role. | A primary Save action is hidden behind More while lower-priority icons remain visible. | Escape closes the layer but focus disappears or jumps to the top of the page. |
| Good UX | Right click on Forecast.xlsx opens commands for that file, Arrow keys move through items, Escape closes the menu, and focus returns to the file row. | A user opens Customer actions, chooses Duplicate customer, and receives status that names the customer and keeps focus anchored to the action context. | A user opens Report actions, arrows to Duplicate report, activates it, and focus returns to the Report actions trigger with a status update. | Opening the due-date popover moves focus to the first date option, choosing Tomorrow updates the field, closes the layer, and returns focus to the Due date trigger. |
| Bad UX | The menu opens for a stale selected object instead of the object under the pointer. | A user activates a menu item that looks like a command but navigates away and loses unsaved context. | A user tabs into a menu and lands in a text input because the menu contains unrelated form controls. | The user scrolls and the popover stays in the old position, so it appears to describe the wrong field. |
| Best fit | Objects or selections have secondary commands that experienced users expect near the target. | A resource, row, card, selected set, or local page object has several contextual commands. | A local object or toolbar has three to eight secondary commands. | A local control needs brief explanatory content or light editing while page context remains visible. |
| Avoid when | The command is primary, urgent, safety-critical, or required for task completion. | Only one or two commands are needed and visible buttons would be faster. | The job is choosing a form value, selecting several values, or browsing a long list. | The content is essential instruction that must remain visible for task completion. |
| Required state | Resting object or selection state before invocation. | Closed trigger or contextual entry point with resource scope. | Closed trigger state with visible or accessible name. | Closed trigger state with visible label, icon name, or field relationship. |
| Accessibility burden | Support keyboard invocation through the context-menu key or Shift+F10 where the platform expects it. | Give the trigger or menu an accessible name that includes the resource or selected-set scope. | Use an actual button for the trigger when possible. | Use a real button or equivalent control as the trigger whenever possible. |
| Common misuse | Making right click or long press the only way to discover important commands. | Letting a bulk action menu run single-object commands against multiple selected items. | Using a menu button for long value selection that should be a select, listbox, combobox, or multi-select. | Using a popover as a hidden modal, drawer, sheet, command menu, or full workflow. |