For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/context-menu.md.
v0.0.57
  • English
  • ContextMenu

    Navigation@rockshin/tao-ui

    Displays contextual actions from a right click or long press interaction.

    When to use

    Use ContextMenu for secondary actions attached to an object or region.

    Recommended

    • Keep items short and action-oriented.
    • Provide another reachable path for critical actions.

    Avoid

    • Do not put primary workflows only inside a context menu.

    Examples

    Basic usage

    Right-click this area
    TSX

    Groups, disabled items, and submenus

    Right-click for grouped actions
    TSX

    Selectable menu items

    Current density: comfortable
    TSX

    Groups and submenus

    Organize actions with groups and nested children; mark destructive actions with danger. Right-click the area.

    Right-click here
    TSX

    Selectable menu items

    Keep selection in selectedKeys and onSelect, for example for view preferences.

    Right-click — 1 shown
    TSX

    Disabled context menu

    disabled turns off the custom menu. Keep essential actions available outside a context menu.

    Right-click here
    TSX

    API

    ContextMenu

    PropertyDescriptionTypeDefault Value
    childrenElement whose right-click (long-press on touch) opens the menu.ReactNode (Required)-
    disabledWhether to disableboolean | undefined-
    classNameMerged onto the floating content.string | undefined-
    styleAdditional styleCSSProperties | undefined-