# Items

Menu items support various configuration options that allow you to customize their appearance, behavior, and content.

The items can be configured either declaratively using the [`MenuItemComponent`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent) properties or programmatically using an array of [`MenuItem`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitem) objects (refer to [Data Binding section](https://www.telerik.com/kendo-angular-ui/components/menus/menu/data-binding#binding-to-local-data) for more details).

## Setting Text

You can set the text of the Menu items by using the [`text`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#text) input of the `MenuItem` component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/text/source.txt)

## Setting Descriptions

To display a secondary text below the main item label, you can use the [`description`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#description) property.

The Menu does not automatically display descriptions when an [item template](https://www.telerik.com/kendo-angular-ui/components/menus/menu/templates#item-template) or [link template](https://www.telerik.com/kendo-angular-ui/components/menus/menu/templates#link-template) replaces the default content. Include `item.description` in the custom template if needed.

The following example adds descriptions to the order workspace's Details and Activity menus.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/description/source.txt)

## Rendering URLs

You can set the URL of the items by using the [`url`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#url) input of the `MenuItem` component. The URL will be rendered as a `href` attribute on the item link.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/url/source.txt)

## Displaying Icons

Depending on the configuration of the project, you can enhance the content of the Menu by displaying any of the following icon types:

* [SVG icons](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#displaying-svg-icons)
* [Font icons](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#displaying-font-icons)

> As of R2 2023 (`v13.0.0`) the default icon type in the Kendo UI for Angular components and Kendo UI themes is changed from `font` to `svg`.
> Set the `svgIcon` property, or [Continue Using Font Icons](https://www.telerik.com/kendo-angular-ui/components/styling/migrating-font-svg#continue-using-font-icons).

### Displaying SVG Icons

To display an SVG icon in the items of the Menu, select one from the [list of SVG icons supported by Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list), and set the [`svgIcon`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#svgicon) to the necessary icon name.

```html
<kendo-menu-item [svgIcon]="svgFolder"></kendo-menu-item>
```

The following example demonstrates how to set the `svgIcon` property of the `MenuItem` component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/icons/svg/source.txt)

### Displaying Font Icons

To display a `font` icon inside the items of the Menu:

1. Use the [`ICON_SETTINGS`](https://www.telerik.com/kendo-angular-ui/components/icons/api/icon_settings) token of the Icons package and set the icon type to `font`. For more information, go to the topic about [`icon settings`](https://www.telerik.com/kendo-angular-ui/components/icons/icon-settings).
2. Set the [`icon`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#icon) property to the necessary icon. For more details, go to the [list of font icons supported by Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/components/icons/icon/icon-list).

```html
<kendo-menu-item icon="folder"></kendo-menu-item>
```

The following example demonstrates how to set the `icon` property of the `MenuItem` component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/icons/regular/source.txt)

## Showing Separator Items

You can specify that an item will be rendered as separating other items by using the [`separator`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#separator) input of the `MenuItem` component.

The following example defines a separator directly in the Menu markup.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/separator/source.txt)

For flat data, set the [`separatorField`](https://www.telerik.com/kendo-angular-ui/components/menus/api/flatbindingdirective#separatorfield) input to the name of the field that marks separator items. For hierarchical data, use the corresponding [`separatorField`](https://www.telerik.com/kendo-angular-ui/components/menus/api/hierarchybindingdirective#separatorfield) input of the hierarchy binding directive.

The following example shows separators in both flat and hierarchical Menu data. Open each menu to see its separator.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/separator-data-binding/source.txt)

## Defining Group Headers

To display a non-interactive label above related items in the Menu, add a Menu item and set the [`groupHeader`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#groupheader) property to `true`. The following snippet places a group header and its related items as siblings inside the Sales submenu.

```html
<kendo-menu>
	<kendo-menu-item text="Sales">
		<kendo-menu-item text="Revenue reports" [groupHeader]="true"></kendo-menu-item>
		<kendo-menu-item text="Daily revenue"></kendo-menu-item>
		<kendo-menu-item text="Monthly revenue"></kendo-menu-item>
	</kendo-menu-item>
</kendo-menu>
```

To further customize the content of the group headers, use a [group header template](https://www.telerik.com/kendo-angular-ui/components/menus/menu/templates#group-header-template).

The following example organizes a commerce dashboard's sales, inventory, and fulfillment reports under group headers.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/group-header/source.txt)

## Adding Styles and Classes

You can set styles and classes to the items by using the [`cssStyle`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#cssstyle) and [`cssClass`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#cssclass) inputs of the `MenuItem` component. `cssStyle` and `cssClass` support the same values as [`ngStyle`](https://angular.dev/api/common/NgStyle#) and [`ngClass`](https://angular.dev/api/common/NgClass).

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/stylesclasses/source.txt)

## Disabling Items

You can specify that a Menu item is disabled by using the [`disabled`](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitemcomponent#disabled) input of the `MenuItem` component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/disabled/source.txt)

## Using Templates

To define a template for an item, nest an `<ng-template>` tag with the [`kendoMenuItemTemplate`](https://www.telerik.com/kendo-angular-ui/components/menus/api/itemtemplatedirective) directive inside a `MenuItem` component.

To define a template for an item link, nest an `<ng-template>` tag with the [`kendoMenuItemLinkTemplate`](https://www.telerik.com/kendo-angular-ui/components/menus/api/itemlinktemplatedirective) directive inside a `MenuItem` component.

To define a template for the item content in place of the children, nest an `<ng-template>` tag with a [`kendoMenuItemContentTemplate`](https://www.telerik.com/kendo-angular-ui/components/menus/api/itemcontenttemplatedirective) directive inside that item.

You can also define [item actions templates](https://www.telerik.com/kendo-angular-ui/components/menus/menu/templates#item-actions-template) for trailing content and [group header templates](https://www.telerik.com/kendo-angular-ui/components/menus/menu/templates#group-header-template) for group labels.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/items/templates/source.txt)

## Suggested Links

* [API Reference of the Menu](https://www.telerik.com/kendo-angular-ui/components/menus/api)
