Right-click context menus with smart positioning and cross-platform support
Hux UI provides a comprehensive context menu system with smart positioning and cross-platform support:
Main wrapper that handles context menu display and positioning.
Properties:
menuItems
- List of menu items and dividerschild
- Widget that triggers the context menuIndividual menu item with icon, text, and interaction handling.
Properties:
text
- Menu item labelicon
- Optional icon (FeatherIcons recommended)onTap
- Action callbackisDisabled
- Whether the item is disabledisDestructive
- Whether the item represents a destructive actionVisual separator for organizing menu items into groups.
Context menus automatically prevent the browser’s default context menu on web platforms using the universal_html package.
See context menus in a file management interface
Learn how to implement editor context menus
Right-click any component in the example app to see context menus in action!