The Menu component displays a dropdown menu with actions that appears when clicking on a trigger element.
It provides a flexible way to create context menus, dropdowns, and action menus with support for grouping,
separators, and keyboard navigation.
} from ' @fintech-sandpit/ui/react ' ;
< Button colorScheme = " primary " >
< Menu.Item value = " new-file " >
< Menu.Item value = " new-folder " >
< Menu.Item value = " settings " >
} from ' @fintech-sandpit/ui/vue ' ;
< Button color-scheme = " primary " >
< Menu.Item value = " new-file " >
< Menu.Item value = " new-folder " >
< Menu.Item value = " settings " >
} from ' @fintech-sandpit/ui/react ' ;
< Button colorScheme = " primary " >
< Menu.Item value = " new-file " >
< Menu.Item value = " open-file " >
< Menu.Item value = " paste " >
} from ' @fintech-sandpit/ui/vue ' ;
< Button color-scheme = " primary " >
< Menu.Item value = " new-file " >
< Menu.Item value = " open-file " >
< Menu.Item value = " paste " >
Name Type Default Description openboolean— Whether the menu is open (controlled) defaultOpenboolean— Whether the menu is open by default (uncontrolled) lazyMountbooleantrueWhether to lazy mount the menu content unmountOnExitbooleantrueWhether to unmount the menu content when it is closed placementPlacementbottom-startThe placement of the menu offsetMainAxisnumber8The offset of the menu on the main axis, px offsetCrossAxisnumber0The offset of the menu on the cross axis, px
Name Type Default Description model-valueboolean— Whether the menu is open (controlled) default-openboolean— Whether the menu is open by default (uncontrolled) lazy-mountbooleantrueWhether to lazy mount the menu content unmount-on-exitbooleantrueWhether to unmount the menu content when it is closed placementPlacementbottom-startThe placement of the menu offset-main-axisnumber8The offset of the menu on the main axis, px offset-cross-axisnumber0The offset of the menu on the cross axis, px
Name Type Default Description valuestring— The value of the menu item valueTextstring— The text to display for the menu item disabledbooleanfalseWhether the menu item is disabled closeOnSelectbooleantrueWhether to close the menu when the menu item is selected
Name Type Default Description valuestring— The value of the menu item value-textstring— The text to display for the menu item disabledbooleanfalseWhether the menu item is disabled close-on-selectbooleantrueWhether to close the menu when the menu item is selected
Applicable to Menu.Trigger, Menu.Content, Menu.Item, Menu.ItemGroup, and Menu.ItemGroupLabel.
Name Type Default Description asChildbooleanfalseWhen true, merges props with the child element instead of rendering a wrapper
Name Type Default Description as-childbooleanfalseWhen true, merges props with the child element instead of rendering a wrapper
Name Type Description onOpenChange(open: boolean) => voidCallback fired when the open state changes
Name Payload Description update:model-valuebooleanEvent emitted when the open state changes
Name Type Description onSelect(value: string) => voidCallback fired when the menu item is selected
Name Payload Description selectstringEvent emitted when the menu item is selected
type Placement = ' top ' | ' top-start ' | ' top-end ' | ' bottom ' | ' bottom-start ' | ' bottom-end ' | ' left ' | ' left-start ' | ' left-end ' | ' right ' | ' right-start ' | ' right-end '
The root component that manages the menu state and provides context to child components. Supports both controlled and uncontrolled usage.
The element that triggers the menu when clicked. Use asChild prop to merge props with a child element.
The main content container for the menu. Automatically includes positioning and portal rendering.
An individual menu item. Supports click handlers and disabled state.
A container for grouping related menu items together.
A label for a menu item group, typically displayed as a header above grouped items.
A visual separator between menu items or groups.