# HeaderContextMenuItem

> _Since v1.15.0_

Context menu item contributed by plugins via the `getContextMenuItems` query.

Plugins return these from `handleQuery({ type: 'getContextMenuItems' })` to add
items to the right-click context menu. Unlike user-configured `ContextMenuItem`,
these are lightweight and statically typed — no dynamic `disabled`/`hidden` callbacks
(the plugin decides at query time what to include).

#### Example

```typescript
override handleQuery(query: PluginQuery): unknown {
  if (query.type === 'getContextMenuItems') {
    const { column } = query.context as ContextMenuParams;
    return [
      { id: 'hide-column', label: 'Hide Column', icon: '👁', action: () => this.hideColumn(column.field) },
    ] satisfies HeaderContextMenuItem[];
  }
}
```

## Properties

| Property | Type | Description |
| -------- | ---- | ----------- |
| `id` | <code>string</code> | Unique identifier for the menu item |
| `label` | <code>string</code> | Display label |
| `icon?` | <code>string</code> | Optional icon (HTML string, emoji, or SVG string) |
| `shortcut?` | <code>string &#124; string[]</code> | Optional keyboard shortcut hint (display only). String array renders as key combo (e.g. ['Ctrl', 'A'] → `<code>Ctrl</code>+<code>A</code>`) |
| `disabled?` | <code>boolean</code> | Whether the item is disabled |
| `action` | <code>() =&gt; void</code> | Action handler when the item is clicked |
| `separator?` | <code>boolean</code> | Whether this is a separator (only `id` is required) |
| `cssClass?` | <code>string</code> | Optional CSS class to add to the menu item (e.g. 'danger') |
| `order?` | <code>number</code> | Sort order for positioning within the menu. Lower values appear first. Default is `100`. Built-in ranges: sort (10-19), filter (20-29), visibility (30-39), pinning (40-49). |
