New to Kendo UI for jQuery? Download free 30-day trial

ToggleButton

The ToggleButton allows users to switch between two states.

To define a ToggleButton, set the togglable property of the button to true. The ToggleButton supports the same configuration options as the standard 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.

<div id="toolbar"></div>

<script>
    $("#toolbar").kendoToolBar({
        items: [
            {
                type: "button",
                togglable: true,
                text: "My ToggleButton",
                spriteCssClass: "myIcon",
                showIcon: "toolbar",
                selected: true
            }
        ]
    });
</script>

See Also

In this article