Navigation

Menubar

@xui/menubar

A desktop-style application menu bar. Built on the Angular CDK's CdkMenuBar: roving focus, arrow keys move between menus, and once one is open, hovering a sibling switches to it. Dropdowns are @xui/menu.

Install

pnpm add @xui/menubar

Add the barrel to a standalone component's imports:

import { XuiMenubarImports } from '@xui/menubar';

@Component({
  imports: [XuiMenubarImports],
  // …
})

Examples

Basic

Loading preview…

API

XuiMenubar

directive[xuiMenubar]

A horizontal application menu bar (File / Edit / View …). Built on @angular/cdk/menu's CdkMenuBar, so it gets roving tab focus, arrow-key movement between menus, open-adjacent-on-arrow, and hover-to-switch once a menu is open. Fill the dropdowns with @xui/menu (<xui-menu> / [xuiMenuItem]).

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the directive's own rather than replacing them.''

XuiMenubarTrigger

directivebutton[xuiMenubarTrigger]

A top-level menu bar item that opens a menu. It is both a CdkMenuItem (so it takes part in the bar's roving focus) and a CdkMenuTrigger (so it opens its menu). Point xuiMenubarTriggerFor at an <ng-template> holding an <xui-menu>.

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the directive's own rather than replacing them.''

Source

libs/ui/menubar/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.