Skip to main content

Context Menu API

Initialization

<script>
import { ContextMenu } from "wx-svelte-menu";

import { getOptions } from "./data";

const options = getOptions();
</script>

<ContextMenu {options}></ContextMenu>
  • Visit the Features Guide to learn more about the widget's functionality.
  • Explore the samples to visualize the available features.

Properties

atspecifies the position of Context Menu relative to the target node
cssadds a custom style to the menu
datakeyspecifies the id of the elements to show Context Menu for
filterspecifies what context to show for the specified targets
optionsspecifies a set of options for Context Menu
resolverenables the multi-area mode and defines whether an element needs a menu

Events

clickfires on clicking an item of Context Menu or outside the menu