# ToggleButton ToolBar Command Type

The ToggleButton allows users to switch between two states.

To define a ToggleButton, set the `Togglable()` method of the button to `true`. The ToggleButton supports the same configuration options as the [standard Button](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/toolbar/command-types/button).

> Clicking a ToggleButton triggers the `Toggle` event but does not trigger the `Click` event.

The following example demonstrates how to define a ToggleButton in the ToolBar component.

```Razor HtmlHelper
    @(Html.Kendo().ToolBar()
        .Name("ToolBar")
        .Items(items =>
        {
            items.Add().Type(CommandType.Button)
                 .Togglable(true)
                 .Text("My Toggle Button")
                 .SpriteCssClass("myIcon")
                 .ShowIcon(ShowIn.Toolbar)
                 .Selected(true);
        })
    )
```

## See Also

* [Basic Usage of the ToolBar (Demo)](https://demos.telerik.com/aspnet-mvc/toolbar)
* [Server-Side API Reference of the ToolBar](https://www.telerik.com/aspnet-mvc/documentation/api/toolbar)
* [Client-Side API Reference of the ToolBar](https://docs.telerik.com/kendo-ui/api/ui/toolbar)
