FabMenu

The floating action button menu opens from a FAB to display multiple related actions.

Usage

FabMenu reveals a short group of related primary actions from one floating action button. Its actions model is shared by React, Angular, and Svelte. Use the external control below to replay the opening and closing choreography; the status region makes controlled state and selection observable without opening the browser console.

Menu: closed

Last action: None

Open the menu with its trigger, then select an action or press Escape. Focus returns to the trigger when the menu closes.

Primary

The default color family is appropriate for the screen’s main creation flow. This large trigger keeps five related actions immediately available.

Secondary extended

Use an extended trigger when its action benefits from a persistent visible label. Opening still contracts it to the medium close control.

Tertiary

The tertiary family can distinguish a contextual action group while preserving the same five-action choreography and large closed trigger.

Controlled state and action events

Use open with onOpenChange (React), openChange (Angular), or bind:open (Svelte) for controlled state. defaultOpen initializes uncontrolled state. Selection emits onActionSelect(action, index) in React and actionSelect with { action, index } in Angular; Svelte receives (action, index) in onActionSelect before closing.

Actions may be buttons or links and may include an icon or disabled state.

Motion

Actions enter progressively from the trigger and collapse in reverse order. When the menu opens, an extended trigger contracts to its icon-only close control. The close control is always medium (56 px), including when the closed trigger is small or large, matching the original FabMenu choreography. The closed trigger keeps its layout footprint while the control remains anchored to its top-right corner. Its container also morphs from the container color to the selected color family; closing reverses these transitions. The choreography uses the framework-independent Motion JavaScript controller in @udixio/core/dom, so React, Angular, and Svelte share the same timing, interruption, cleanup, and reduced-motion behavior. No motion/react adapter is required.

Accessibility and interaction

The trigger exposes aria-expanded and aria-controls. Opening moves focus to the first enabled action. Escape closes the group and restores trigger focus; selection and outside press also close it. Actions retain ordinary button/link semantics inside a labelled group instead of claiming full ARIA menu behavior.

Use closeLabel and actionsLabel when the generated English defaults are not appropriate for the product language.

Migrating to 3.0

Before3.0
<FabMenu><Button>…</Button></FabMenu><FabMenu actions={[…]} />
child callbacksonActionSelect(action, index) / actionSelect
React-only motion/react choreographyshared Motion JavaScript, focus, and dismissal
explicit close childcloseIcon and closeLabel