Skip to content
pubscout

base_menu

0.2.2, released 5 weeks ago by davidhicks.dev

Composable primitives for building accessible menu systems.

WASM-ready
$ flutter pub add base_menu
Source repository

What it does

Provides headless primitive widgets like BaseMenu, BaseMenuBar, and BaseMenuItem to build custom, accessible menu systems with full WAI-ARIA keyboard support and menu aim assist. It manages keyboard traversal, focus routing, and menu positioning without painting any pixels itself.

AI-written summary of version 0.2.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to build a custom menu bar, context menu, or multi-level submenu system.
  • You require robust keyboard navigation following WAI-ARIA standards.
  • You want complete control over the visual styling of menus rather than relying on pre-styled components.

Skip it when

  • You prefer out-of-the-box material design menus that require minimal setup.
  • You are not using Flutter.

Strengths

  • Completely headless, allowing fully customized styling and layout.
  • Built-in WAI-ARIA compliant keyboard support and focus routing.
  • Includes menu aim assist (safe triangles) for better hover interactions.

Weaknesses

  • Requires manual implementation of visual styling and layouts since it provides no painted pixels out of the box.
  • API is relatively new and subject to change.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

not documented

BaseMenu(
  menu: StyledMenuPanel(
    child: BaseMenuPanel(
      children: [
        const MenuItem(label: 'Undo'),
        const MenuItem(label: 'Redo'),
      ],
    ),
  ),
  // ...
)

Alternatives

Packages that do the same job and could replace base_menu.

  • super_context_menu

    Context menu widget supporting native menus on platforms and drag & drop transitions on mobile.

  • unified_popups

    Unified overlay popup system for Flutter offering toast, loading, confirm, sheet, menu and more without needing a BuildContext.

  • tap_builder

    A simple widget for building interactive areas with customizable visual effects.

  • flutter_rating

    A customizable star rating widget for Flutter.