TwitterGithub

Dropdown

Displays a menu to the user — such as a set of actions or functions — triggered by a button.

Installation

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

Usage

import {
  BrnMenuDirective,
  BrnMenuGroupDirective,
  BrnMenuItemDirective,
  BrnMenuTriggerDirective,
} from '@spartan-ng/ui-menu-brain';
import {
  HlmMenuDirective,
  HlmMenuItemDirective,
  HlmMenuItemIconDirective,
  HlmMenuItemSubIndicatorComponent,
  HlmMenuLabelComponent,
  HlmMenuSeparatorComponent,
  HlmMenuShortcutComponent,
  HlmSubMenuDirective,
} from '@spartan-ng/ui-menu-helm';
<button [brnMenuTriggerFor]="menu">Open</button>

<ng-template #menu>
  <div hlm brnMenu>
    <hlm-menu-label>My Account</hlm-menu-label>
    <hlm-menu-separator />
    <div brnMenuGroup>
      <button hlm brnMenuItem>
        Profile
        <hlm-menu-shortcut>⇧⌘P</hlm-menu-shortcut>
      </button>

      <hlm-menu-separator />

      <button hlm brnMenuItem [brnMenuTriggerFor]="invite">
        Invite Users
        <hlm-menu-item-sub-indicator />
      </button>
    </div>
  </div>
</ng-template>

Examples

Stateful

Input Dialog