name thatuiuser interface

The menu at the pointer is a context menu — right-click (or click) the folder to toggle it

Context Menu

/ NSMenu · View.contextMenu(menuItems:) /

also called contextual menu, right-click menu, shortcut menu

A context menu exposes actions relevant to the object under the pointer and opens from a secondary click or Control-click. It appears near that click and is made from standard menu items, separators, keyboard equivalents, and submenus. A dropdown menu has a visible control that opens it with a primary click, while a context menu is invoked directly from the content.

Anatomy — every part, named

  1. 1
    Selection highlightNSMenuItem

    “The blue bar behind the option under the pointer” is the menu item's selection highlight.

  2. 2
    Separator itemNSMenuItem.separator()

    “The little line between groups of right-click options” is a separator item.

  3. 3
    Key equivalentNSMenuItem.keyEquivalent

    “The keyboard shortcut text on the right” is the item's key equivalent.

  4. 4
    Submenu indicatorNSMenuItem.submenu

    “The sideways arrow that opens more options” is the submenu indicator.

Prompt — paste into your agent

Add a Context Menu using NSMenu on the target NSView (SwiftUI: View.contextMenu), opened by right-click or Control-click at the item under the pointer. Populate it with actions specific to that item; do not turn it into a primary-click dropdown anchored to a button.

In code

The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).

AppKitNSMenu
SwiftUIView.contextMenu(menuItems:)
AppKitNSView.menuthe contextual menu associated with a view
AppKitNSMenuItem

See also

Search

Describe the UI element you're thinking of