# Icons

Starting with version R2 2025, you can use icons in the Menu items.

For a runnable example, refer to the [demo on displaying icons in the Menu](https://demos.telerik.com/aspnet-mvc/menu/icons).

## Basic Usage

The icons of the items can be configured depending on how the Menu binds to its data. For more information on the available data-binding approaches, refer to the [data binding article of the Menu](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/menu/binding/binding-overview).

### Remote Data Binding

When the [Menu is configured for remote data binding](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/menu/binding/binding-remote-data) or [binds to a Model collection using the `BindTo()` method](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/menu/binding/model-binding), specify the Model property that stores the icon's name through the [`DataIconField`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/menubuilder#dataiconfieldsystemstring) option. Also, you can define an additional Model property that holds a custom CSS `class` for the respective icon and set it in the Menu configuration using the [`DataIconClassField`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/menubuilder#dataiconclassfieldsystemstring) method.

```Razor HtmlHelper
    @(Html.Kendo().Menu()
        .Name("menu")
        .DataTextField("Text")
        .DataIconField("Icon")
        .DataSource(dataSource => dataSource
            .Read(read => read.Action("GetItems", "Menu"))
        )
    )
```

### Items Binding

When using [Items binding](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/menu/binding/items-binding) to define the Menu items, you can specify an icon for each item through the `Icon` option.
To define a custom CSS `class` for the respective icon, use the `IconClass` option.

```Razor HtmlHelper
    @(Html.Kendo().Menu()
        .Name("menu")
        .Items(items => {
            items.Add().Text("Item 1").Icon("pencil");
            items.Add().Text("Item 2").Icon("home");
            items.Add().Text("Item 3").Icon("plus");
        })
    )
```

## SVG Icons

The following example demonstrates how to display [SVG icons](https://www.telerik.com/aspnet-mvc/documentation/styles-and-layout/sass-themes/svg-icons) in the Menu's items when the component is configured for remote data binding. Also, the icon of the first item has a custom CSS class added through the `IconClass` option.

```Razor HtmlHelper
@(Html.Kendo().Menu()
    .Name("menu")
    .DataTextField("Text")
    .DataIconField("Icon")
    .DataIconClassField("IconClass")
    .BindTo(new MenuItem[] {
        new MenuItem { Text = "Home", Icon = "home", IconClass = "custom-icon-class" },
        new MenuItem { Text = "About Us", Icon = "info-circle" },
        new MenuItem { Text = "Contact", Icon = "envelope" }
    })
)
```

## Font Icons

The following example demonstrates how to display [Font icons](https://www.telerik.com/aspnet-mvc/documentation/styles-and-layout/sass-themes/font-icons) in the Menu's items when the component binds to a data collection.

```Razor HtmlHelper
<link rel="stylesheet" href="https://unpkg.com/@@progress/kendo-font-icons/dist/index.css" />

@(Html.Kendo().Menu()
    .Name("menu")
    .BindTo(new MenuItem[] {
        new MenuItem { Text = "Home", Icon = "home" },
        new MenuItem { Text = "About Us", Icon = "info-circle" },
        new MenuItem { Text = "Contact", Icon = "envelope" }
    })
)

<script>
    kendo.setDefaults("iconType", "font");
</script>
```

## Icon Position

You can define the position of the icons in the Menu items by using the `IconPosition()` option. By default, each icon is positioned before the item's text.

```Razor HtmlHelper
@(Html.Kendo().Menu()
    .Name("menu")
    .IconPosition(IconPosition.After)
    .BindTo(new MenuItem[] {
        new MenuItem { Text = "Home", Icon = "home" },
        new MenuItem { Text = "About Us", Icon = "info-circle" },
        new MenuItem { Text = "Contact", Icon = "envelope" }
    })
)
```

```Razor TagHelper
@using Kendo.Mvc.TagHelpers

@{
    var items = new MenuItemBase[] {
        new MenuItemBase { Text = "Home", Icon = "home" },
        new MenuItemBase { Text = "About Us", Icon = "info-circle" },
        new MenuItemBase { Text = "Contact", Icon = "envelope" }
    };
}

<kendo-menu
    name="menu"
    icon-position="@IconPosition.After"
    bind-to="@items" 
/>
```

## See Also

* [Using the API of the Menu for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/menu/api)

* [Client-Side API of the Menu](https://docs.telerik.com/kendo-ui/api/ui/menu)

* [Server-Side API of the Menu](https://www.telerik.com/aspnet-mvc/documentation/api/menu)

* [Knowledge Base Section](https://www.telerik.com/aspnet-mvc/documentation/knowledge-base)
