---
id: "packages/active-grid/api/context-menu-utils"
title: "createContextMenu"
description: "createContextMenu: generated from the source of active-grid."
url: "/packages/active-grid/api/context-menu-utils"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:context-menu-utils"
---

# createContextMenu

Exported by `@workspace/active-grid`. Generated from the package source; part of [the index of every export](/packages/active-grid/api).

## Functions, hooks and constants

**createContextMenu**: `<TData>(options: CreateContextMenuOptions<TData>) => ContextMenuBuilder<TData>`

Utility to build context menu items in a type-safe way.

It declares the permission check and lets {@link resolveContextMenuItems}
do the rest: filtering on `permission` AND `visible`, giving the
destructive tail its line, and cleaning up — at the top level and in every
submenu.
