Menu options
The contextual menu includes several pre-built options that you can enable by adding their identifier to your configuration.
Enable the contextual menu
Add thecontextual field to your docs.json file and specify which options you want to include.
Display location
By default, the contextual menu appears in the page header. You can configure it to display in the table of contents sidebar instead using thedisplay option.
Add custom options
Create custom options in the contextual menu by adding an object to theoptions array. Each custom option requires these properties:
string
required
The title of the option.
string
required
The description of the option. Displayed beneath the title when the contextual menu expands.
string
required
The icon to display.Options:
- Font Awesome icon name, if you have the
icons.libraryproperty set tofontawesomein yourdocs.json - Lucide icon name, if you have the
icons.libraryproperty set tolucidein yourdocs.json - Tabler icon name, if you have the
icons.libraryproperty set totablerin yourdocs.json - URL to an externally hosted icon
- Path to an icon file in your project
string
The Font Awesome icon style. Only used with Font Awesome icons.Options:
regular, solid, light, thin, sharp-solid, duotone, brands.string | object
required
The href of the option. Use a string for simple links or an object for dynamic links with query parameters.
Custom option examples
Simple link
Simple link
Dynamic link with page content
Dynamic link with page content