Skip to main content

Menu

Function Menu 

Source
pub fn Menu(_: MenuProps) -> Element
Expand description

A menu of actions, shown while open. Focus moves to the first item when it opens and back to return_focus when it closes.

§Props

For details, see the props struct definition.

  • label : AccessibleName
  • entries : Vec<MenuEntry>
  • open : bool
  • anchor : MenuAnchor
  • return_focus : Id

    Where focus goes back to on close: the trigger, or the element right-clicked.

  • onclose : EventHandler<()>
  • onselect : EventHandler<String>
  • from_end : bool

    Open with the last item focused, for a menu button opened by Arrow Up.

  • menu_id : Option<Id>

    The menu element’s id, when a trigger refers to it. Generated when omitted.

  • class : Option<String>
  • attributes : Vec<Attribute>