Menu

inprogress

    Overview

    When to use

    Use the Menu component when you need to provide a list of options or actions to the user in a compact and organized manner. Menu.Item will return a button unless an href prop is passed, then it will return as <a> EventTarget.

    Smart Placement

    The Menu component automatically adjusts its placement to ensure optimal visibility within the viewport. This smart placement feature ensures that the menu is displayed in a position where it won't be cut off by the edges of the screen.


    Component

    Default

    Placement

    autoCloseOnClick

    States

    Programatically close


    Properties

    Default

    PropertyTypeRequiredDefaultDescription
    utilClassNamesStringfalse-
    childrenNodefalse-
    componentRefShape
    { "current": "Any" }
    false-
    triggerNodefalse-
    openBoolfalse-
    placementEnum
    "top" │ "top-start" │ "top-end" │ "right" │ "right-start" │ "right-end" │ "bottom" │ "bottom-start" │ "bottom-end" │ "left" │ "left-start" │ "left-end"
    false-Exported as Menu.Placement.right
    autoCloseOnClickBoolfalse-
    onMenuDismissFuncfalse-
    PropertyTypeRequiredDefault
    utilClassNamesStringfalse-
    childrenNodefalse-
    PropertyTypeRequiredDefault
    utilClassNamesStringfalse-
    childrenNodefalse-
    iconNodefalse-
    hrefStringfalse-
    disabledBoolfalse-