Floating Menu

Shared menu rendering infrastructure.

Basic use

Radix · integration snippet
use xgpui_luma_look_radix as radix;

fn radix_menu_look(look: &radix::Look) -> xgpui_luma::controls::floating_menu::FloatingMenuLook {
    radix::floating_menu_look(look, radix::PopupMenuVariant::Solid, radix::Tone::Accent)
}

Compilation-checked Radix snapshot helper. Resolve during render after Look changes and pass the returned styling to the SDK renderer.

Radix styling

floating_menu_look(&look, variant, tone) supplies panel, item, separator, and submenu styling to SDK renderers. floating_menu_look_for(..., size) selects a control size. Keep highlight state and event handling in the shared SDK menu engine; no additional entity is needed.

Pass an explicit Look, including forks. Theme adapters retain that binding; notify affected controls and their owners after palette, mode, or stylesheet edits. Resolved look values are snapshots and must be resolved again during render.

See the Radix control support table for adapter and utility status.

SDK behavior & customization

Not a spawnable control. Popup Menu and Context Menu use it for highlight state and submenu chrome.

Relevant contracts: FloatingMenuRenderModel, FloatingMenuTemplateHandlers, FloatingMenuTemplateModifier, FloatingMenuTemplate.

Use the module’s template contract for structural changes. Builder modifiers and item templates vary by control.

Application interaction

Floating Menu is rendering infrastructure. Subscribe to PopupMenuEvent or ContextMenuEvent on the owning control.

Source

SDK module · Radix adapter