The contextual menu provides quick access to AI-optimized content and direct integrations with popular AI tools. When users select the contextual menu on any page, they can copy content as context for AI tools or open conversations in ChatGPT, Claude, Perplexity, or a custom tool of your choice with your documentation already loaded as context.
  • Copy page: Copies the current page as Markdown for pasting as context into AI tools.
  • View as Markdown: Opens the current page as Markdown.
  • Open in ChatGPT: Creates a ChatGPT conversation with the current page as context.
  • Open in Claude: Creates a Claude conversation with the current page as context.
  • Open in Perplexity: Creates a Perplexity conversation with the current page as context.
  • Your custom options: Add your own options to the menu.
The expanded contextual menu showing the Copy page, View as Markdown, Open in ChatGPT, and Open in Claude menu items.

Enabling the contextual menu

Add the contextual field to your docs.json file and specify which options you want to include.
{
 "contextual": {
   "options": [
     "copy",
     "view",
     "chatgpt",
     "claude",
     "perplexity"
   ]
 }
}

Adding custom options

Create custom options in the contextual menu by adding an object to the options array. Each custom option requires these properties:
title
string
required
The title of the option.
description
string
required
The description of the option. Displayed beneath the title when the contextual menu is expanded.
icon
string
required
The icon to display.Options:
  • Font Awesome icon name
  • Lucide icon name
  • JSX-compatible SVG code wrapped in curly braces
  • URL to an externally hosted icon
  • Path to an icon file in your project
For custom SVG icons:
  1. Convert your SVG using the SVGR converter.
  2. Paste your SVG code into the SVG input field.
  3. Copy the complete <svg>...</svg> element from the JSX output field.
  4. Wrap the JSX-compatible SVG code in curly braces: icon={<svg ...> ... </svg>}.
  5. Adjust height and width as needed.
iconType
string
The Font Awesome icon style. Only used with Font Awesome icons.Options: regular, solid, light, thin, sharp-solid, duotone, brands.
href
string | object
required
The href of the option. Use a string for simple links or an object for dynamic links with query parameters.
Example custom option:
{
    "contextual": {
        "options": [
            "copy",
            "view",
            "chatgpt",
            "claude",
            "perplexity",
            {
                "title": "Request a feature",
                "description": "Join the discussion on GitHub to request a new feature",
                "icon": "plus",
                "href": "https://github.com/orgs/mintlify/discussions/categories/feature-requests"
            }
        ]
    }
}