Twitter2.2k

Context Menu

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

Right click here

About

Context Menu is built with the help of Menu from Material CDK and Dropdown Menu .

Installation

ng @spartan-ng/cli:ui context-menu

Usage

import { HlmContextMenuImports } from '@spartan-ng/helm/context-menu';
import { HlmDropdownMenuImports } from '@spartan-ng/helm/dropdown-menu';
<div [hlmContextMenuTrigger]="menu">Right click here</div>

<ng-template #menu>
  <hlm-dropdown-menu>
    <hlm-dropdown-menu-group>
      <button hlmDropdownMenuItem>Profile</button>
      <button hlmDropdownMenuItem>Billing</button>
      <button hlmDropdownMenuItem>Team</button>
      <button hlmDropdownMenuItem>Subscription</button>
    </hlm-dropdown-menu-group>
  </hlm-dropdown-menu>
</ng-template>

Stateful

Right click here
Unsaved Changes

Helm API

HlmContextMenuTrigger

Selector: [hlmContextMenuTrigger]

Inputs

PropTypeDefaultDescription
disabled boolean this._cdkTrigger.disabled -
align MenuAlign this._config.align -
side MenuSide this._config.side -
Data Table Command