# Menu

Menu extensions contain one or more [menu item extensions](https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/menu-item) and can appear throughout the backoffice, such as in sidebars and flyouts.

<figure><img src="https://2050077833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb0WSXUuM7Qx5BfREagAI%2Fuploads%2Fgit-blob-da3d9b2d2371d941b338331114cbd7ab610184e3%2Fmenu.png?alt=media" alt="" width="250"><figcaption><p>Menu</p></figcaption></figure>

## Creating a custom menu

Menu extensions can be created using either JSON or TypeScript. Both approaches are shown below.

{% tabs %}
{% tab title="JSON" %}
{% code title="umbraco-package.json" %}

```json
{
    "$schema": "../../umbraco-package-schema.json",
    "name": "My Package",
    "version": "0.1.0",
    "extensions": [
        {
            "type": "menu",
            "alias": "My.Menu",
            "name": "My Menu"
        }
    ]
}
```

{% endcode %}
{% endtab %}

{% tab title="TypeScript" %}
Extension authors define the menu manifest, then register it dynamically/during runtime using a [Backoffice Entry Point](https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/backoffice-entry-point) extension.

{% code title="my-menu/manifests.ts" %}

```typescript
import type { ManifestMenu } from '@umbraco-cms/backoffice/menu';

export const menuManifest: ManifestMenu = {
    type: 'menu',
    alias: 'My.Menu',
    name: 'My Menu'
};
```

{% endcode %}

{% code title="entrypoints/entrypoints.ts" %}

```typescript
import type {
    UmbEntryPointOnInit,
} from "@umbraco-cms/backoffice/extension-api";
import { umbExtensionsRegistry } from "@umbraco-cms/backoffice/extension-registry";
import { menuManifest } from "./../my-menu/manifests.ts";

export const onInit: UmbEntryPointOnInit = (_host, _extensionRegistry) => {
    console.log("Hello from my extension 🎉");

    umbExtensionsRegistry.register(menuManifest);
};
```

{% endcode %}
{% endtab %}
{% endtabs %}

## See Also

* [Section Sidebar](https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/sections/section-sidebar) for information on creating menus for navigation within section extensions.
* [Menu Item](https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/menu-item) for information on creating menu items.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/menu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
