Skip to main content

Module menu

Module menu 

Source
Expand description

Menus, menu buttons, and context menus, from menu.css, on upstream’s fc-context-menu model.

Follows upstream’s menu.ts: the menu is a popover in the top layer with light dismiss; focus moves into it (roving, unlike a select) and always returns to its invoker on close, Escape included; arrows wrap past separators and unavailable items, Home and End jump, typed characters search within 500 ms; Tab closes without trapping. Traversal is fc_context_menu::Menu, which upstream can run as WASM.

Re-exports§

pub use Menu_completions::Component::Menu;
pub use MenuButton_completions::Component::MenuButton;
pub use ContextMenuArea_completions::Component::ContextMenuArea;

Structs§

ContextMenuAreaProps
Properties for the ContextMenuArea component.
MenuButtonProps
Properties for the MenuButton component.
MenuProps
Properties for the Menu component.

Enums§

MenuAnchor
Where a menu opens.
MenuEntry
One line of a menu.

Functions§

ContextMenuArea
A region whose right-click (or the context-menu key) opens a menu at the pointer, instead of the browser’s own.
Menu
A menu of actions, shown while open. Focus moves to the first item when it opens and back to return_focus when it closes.
MenuButton
A button that opens a menu beneath itself, on the WAI-ARIA menu button pattern: click, Enter, or Space toggle it; Arrow Down opens at the first item and Arrow Up at the last. aria-expanded follows the menu.