Menu

Headless, unstyled submenu and radio-group components shared by the Dropdown Menu, Context Menu and Menubar primitives. They add nested panels and single-choice groups to a menu without any default styling.

Submenus nest to any depth: a BbMenuSubContent is itself a menu panel, so it accepts more BbMenuSub children. The panel re-cascades the host family's context into the portal, so regular BbDropdownMenuItem children keep working inside it.

Context Menu with a Submenu

The same components work inside a BbContextMenuContent. Hovering a trigger opens its submenu without moving focus; clicking, , Enter or Space opens it and focuses the first enabled item.
A radio group can sit in the root panel or in a submenu. The primitive group does not cascade its type parameter, so give both the group and each item the same explicit TValue. Values are compared with EqualityComparer<TValue>.Default.