Examples › Custom content
You can also display custom content in the context menu by providing a render callback to the showContextMenu function instead of an array of items.
The render callback will receive a close function that you can use to close the menu.
Have a look at the example below to see how it works:
Right-click on the image to trigger the context menu:

Picture by Kristina Yadykina
Interactive content
Custom content can contain interactive elements such as inputs, sliders or checkboxes; the menu is only closed when clicking outside of it, pressing Escape, or when you call the close function.
Keep in mind that the render callback is called with the values available when the menu is shown, so interactive content should keep its own state in a separate component, like in the example below:
Right-click on the image to adjust it:

Picture by Roberto Huczek
Head over to the next example to discover other features.