Text of code.visualstudio.com › api › ux-guidelines › context-menus as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Context Menus | Visual Studio Code Extension API

AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. Context Menus View as Markdown Ask in VS Code Ask in VS Code Insiders Menu items appear in views, actions, and right-click menus. It's important that the grouping of menus remain consistent.

If your extension has actions that relate to files, place your actions in the File Explorer context menu (when appropriate). If an extension has actions for certain file types, only display it for those items. ✔️ Do Show actions when contextually appropriate Group similar actions together Place large groups of actions into a submenu ❌ Don't Show actions for every file without context This example places a Copy GitHub Permalink next to the other copy commands.

This action only appears on files that are from a GitHub repository. Links Context Menu API reference 11/18/2026