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

Add a Close Button to TabStrip Tabs


Product Progress® Kendo UI® TabStrip for jQuery
Operating System Windows 10 64bit
Visual Studio Version Visual Studio 2017
Preferred Language JavaScript


How can I add a Close button to a Kendo UI for jQuery TabStrip tab?


You can programmatically remove the TabStrip tabs with JavaScript.

The following example shows how to add buttons inside the tabs to do this. The milestones of the approach are:

  • You have to place the buttons in a <span> element, which wraps the whole tab text.
  • When adding a new tab with a button programmatically, set encoded to false.
  • The example uses the tabGroup field and the append and remove TabStrip methods.
  • To distinguish the tab Remove buttons, the example also uses a data-type="remove" attribute.

  .k-tabstrip-items li .k-button {
    line-height: 1;
    padding: 0;
    vertical-align: top;
    margin-bottom: -2px;

  .k-tabstrip-items li .k-icon {
    margin: 0;


<div id="tabstrip">
    <li class="k-active">Item 1</li>
    <li><span>Item 2 <button data-type="remove" class="k-button k-button-icon"><span class="k-icon k-i-close"></span></button></span></li>
    Content 1
    <p><button type="button" class="k-button" id="appendButton">Append Item</button></p>
    Content 2

    // Initialize the TabStrip. Server wrappers will generate the below line automatically.

    // Get the reference of the component.
    var tabstrip = $("#tabstrip").data("kendoTabStrip");

    tabstrip.tabGroup.on("click", "[data-type='remove']", function(e) {

        var item = $(".k-item");

    var tabCounter = tabstrip.items().length;

        text: 'Item ' + (++tabCounter) + ' <button data-type="remove" class="k-button k-button-icon"><span class="k-icon k-i-close"></span></button>',
        encoded: false,
        content: "<p>Appended item " + tabCounter + " content</p>"

See Also

In this article