TwitterGithub

Context Menu

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

Right click here

Installation

npx nx g @spartan-ng/cli:ui contextmenu

Usage

import { BrnContextMenuTriggerDirective, BrnMenuTriggerDirective } from '@spartan-ng/brain/menu';
import {
  HlmMenuComponent,
  HlmMenuGroupComponent,
  HlmMenuItemCheckComponent,
  HlmMenuItemCheckboxDirective,
  HlmMenuItemDirective,
  HlmMenuItemIconDirective,
  HlmMenuItemRadioComponent,
  HlmMenuItemRadioDirective,
  HlmMenuItemSubIndicatorComponent,
  HlmMenuLabelComponent,
  HlmMenuSeparatorComponent,
  HlmMenuShortcutComponent,
  HlmSubMenuComponent,
} from '@spartan-ng/ui-menu-helm';
<div [brnCtxMenuTriggerFor]="menu">Right click here</div>

<ng-template #menu>
  <hlm-menu class="w-64">
    <hlm-menu-group>
      <button inset hlmMenuItem>
        Save
        <hlm-menu-shortcut>S</hlm-menu-shortcut>
      </button>
    </hlm-menu-group>
  </hlm-menu>
</ng-template>

Stateful

Right click here
Data Table Command