chrome:shell.skip

generated:catalog.entry.menu.title

generated:catalog.entry.menu.description

@xngui/components/menu
import { XMenu } from '@xngui/components/menu';

chrome:demo.section

chrome:demo.preview

demo-preview:hints.category.navigation:
↑ ↓
demo-preview:hints.category.shortcuts:
Enter / SpaceEscapeType
demo-preview:projection.slots-label:
ng-content
import { Component } from '@angular/core';
import { XButton } from '@xngui/components/button';
import { XMenu, XMenuGroup, XMenuItem, XMenuSeparator } from '@xngui/components/menu';
 
@Component({
selector: 'app-example',
imports: [XButton, XMenu, XMenuGroup, XMenuItem, XMenuSeparator],
templateUrl: './menu.component.html',
})
export class ExampleComponent {}

chrome:demo.events.title

chrome:demo.events.empty

chrome:demo.api.title

x-menu

chrome:demo.api.col.property
chrome:demo.api.col.type
chrome:demo.api.col.default
chrome:demo.api.col.description
placement
XPlacement
—
Connected placement — submenus default to `end-start`; root menus fall back to XConfigService when unset.
offsetX
number
0
Horizontal offset from the anchor (px).
offsetY
number
this.parentMenu ? 0 : DEFAULT_ORIGIN_OFFSET_Y
Vertical offset from the anchor (px).
size
XSize
—
Visual size tier — nested menus inherit the parent; otherwise falls back to XConfigService when unset.
density
XDensity
—
Spacing offsets — orthogonal to `size`; nested menus inherit the parent resolved density when unset.
matchWidth
boolean
false
When true, the open panel width matches the trigger origin (overridable per open via `options.width`).
ariaLabel
string
—
Accessible name for the menu panel.
panelClass
string
—
Extra class names applied to the floating panel element.
role
'menu' | 'listbox'
'menu'
ARIA role for the panel (`menu` by default; `listbox` when used by `x-select`).
ariaMultiselectable
boolean
false
When `role` is `listbox`, exposes multi-select to assistive tech.