TwitterGithub

Menubar

A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands.

Installation

npx nx g @spartan-ng/nx:ui menubar

Usage

import {
  BrnMenuBarDirective,
  BrnMenuDirective,
  BrnMenuGroupDirective,
  BrnMenuItemCheckboxDirective,
  BrnMenuItemDirective,
  BrnMenuItemRadioDirective,
  BrnMenuTriggerDirective,
} from '@spartan-ng/ui-menu-brain';
import {
  HlmMenuBarDirective,
  HlmMenuBarItemDirective,
  HlmMenuDirective,
  HlmMenuItemCheckComponent,
  HlmMenuItemDirective,
  HlmMenuItemIconDirective,
  HlmMenuItemRadioComponent,
  HlmMenuItemSubIndicatorComponent,
  HlmMenuLabelComponent,
  HlmMenuSeparatorComponent,
  HlmMenuShortcutComponent,
  HlmSubMenuDirective,
} from '@spartan-ng/ui-menu-helm';
<div hlm brnMenuBar class="w-fit">
    <button hlmMenuBarItem brnMenuItem [brnMenuTriggerFor]="file">File</button>
</div>

<ng-template #file>
    <div hlm brnMenu variant="menubar" class="w-48">
        <div brnMenuGroup>
            <button hlm brnMenuItem>
                New Tab
                <hlm-menu-shortcut>T</hlm-menu-shortcut>
            </button>
        </div>

        <hlm-menu-separator />

        <button hlm brnMenuItem [brnMenuTriggerFor]="share">
            Share
            <hlm-menu-item-sub-indicator />
        </button>
</ng-template>
<ng-template #share>
    <div hlm brnSubMenu>
        <button hlm brnMenuItem>Email link</button>
    </div>
</ng-template>
Popover Label